Page 1 of 1

xBrowse sort

PostPosted: Wed Jan 14, 2009 12:29 pm
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

Re: xBrowse sort

PostPosted: Wed Jan 14, 2009 12:46 pm
by JC
Try this:
Code: Select all  Expand view
oBrw:aArrayData := aAnyArray
oBrw:refresh()

Re: xBrowse sort

PostPosted: Wed Jan 14, 2009 1:03 pm
by Detlef Hoefner
Julio,

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

Best regards,
Detlef

Re: xBrowse sort

PostPosted: Wed Jan 14, 2009 2:07 pm
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.

Re: xBrowse sort

PostPosted: Wed Jan 14, 2009 3:03 pm
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

Re: xBrowse sort

PostPosted: Wed Jan 14, 2009 4:27 pm
by JC
Detlef,

Please, try this:
Code: Select all  Expand view
oCol:setOrder()

Re: xBrowse sort

PostPosted: Wed Jan 14, 2009 5:18 pm
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

Re: xBrowse sort

PostPosted: Wed Jan 14, 2009 5:42 pm
by JC
Detlef,

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