xBrowse sort

xBrowse sort

Postby Detlef Hoefner » Wed Jan 14, 2009 12:29 pm

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
Detlef Hoefner
 
Posts: 312
Joined: Sat Oct 08, 2005 9:12 am
Location: Germany

Re: xBrowse sort

Postby JC » Wed Jan 14, 2009 12:46 pm

Try this:
Code: Select all  Expand view
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
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Re: xBrowse sort

Postby Detlef Hoefner » Wed Jan 14, 2009 1:03 pm

Julio,

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

Best regards,
Detlef
User avatar
Detlef Hoefner
 
Posts: 312
Joined: Sat Oct 08, 2005 9:12 am
Location: Germany

Re: xBrowse sort

Postby JC » Wed Jan 14, 2009 2:07 pm

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
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Re: xBrowse sort

Postby Detlef Hoefner » Wed Jan 14, 2009 3:03 pm

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
Detlef Hoefner
 
Posts: 312
Joined: Sat Oct 08, 2005 9:12 am
Location: Germany

Re: xBrowse sort

Postby JC » Wed Jan 14, 2009 4:27 pm

Detlef,

Please, try this:
Code: Select all  Expand view
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
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Re: xBrowse sort

Postby Detlef Hoefner » Wed Jan 14, 2009 5:18 pm

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
Detlef Hoefner
 
Posts: 312
Joined: Sat Oct 08, 2005 9:12 am
Location: Germany

Re: xBrowse sort

Postby JC » Wed Jan 14, 2009 5:42 pm

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
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 82 guests