xBrowse sort

Post Reply
User avatar
Detlef Hoefner
Posts: 312
Joined: Sat Oct 08, 2005 9:12 am
Location: Germany
Contact:

xBrowse sort

Post by Detlef Hoefner »

Hi all,

i think it's better to start a seperate topic for this question.

i have a 4 column xBrowse over an array.
The xBrowse is set with AUTOCOLS and AUTOSORT.

I found out that if i rebuild the array my column header names change to Col1, Col2 ....
and the sort order is mixed up.

How can i call the browse sort process for a certain column after rebuild of the source array?

Thanks for all assistance.
Regards,
Detlef
User avatar
JC
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil
Contact:

Re: xBrowse sort

Post by JC »

Try this:

Code: Select all | Expand

oBrw:aArrayData := aAnyArray
oBrw:refresh()
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
User avatar
Detlef Hoefner
Posts: 312
Joined: Sat Oct 08, 2005 9:12 am
Location: Germany
Contact:

Re: xBrowse sort

Post by Detlef Hoefner »

Julio,

many thanks for yor advice.
But this doesn't start the sorting process of a specified column.

Best regards,
Detlef
User avatar
JC
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil
Contact:

Re: xBrowse sort

Post by JC »

Detlef,

Maybe you need to set the column again!
With this way, we can redefine the filled array into the header columns of xBrowse.
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
User avatar
Detlef Hoefner
Posts: 312
Joined: Sat Oct 08, 2005 9:12 am
Location: Germany
Contact:

Re: xBrowse sort

Post by Detlef Hoefner »

Julio,

i'm sorry, but it dosn't work as you suppose.

I just need to call a method of xBrowse to start the sorting process for a specified column.
Unfortunately i didn't find such method in the xBrowse sources.

Antonio, do you have an advice for me?

Thanks and regards,
Detlef
User avatar
JC
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil
Contact:

Re: xBrowse sort

Post by JC »

Detlef,

Please, try this:

Code: Select all | Expand

oCol:setOrder()
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
User avatar
Detlef Hoefner
Posts: 312
Joined: Sat Oct 08, 2005 9:12 am
Location: Germany
Contact:

Re: xBrowse sort

Post by Detlef Hoefner »

Julio,

yes!!!! you were right.
Now i got it working with oBrw:aCols[ n ]:SetOrder()

But be careful
You will have to set oBrw:aCols[ 3 ]:cOrder := 'D' after.
Otherwise with every call you have alternating ascending and descending sort orders.

Thanks again.
Regards,
Detlef
User avatar
JC
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil
Contact:

Re: xBrowse sort

Post by JC »

Detlef,

Yes! you are right too!
Is needed to define cOrder property before!
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Post Reply