FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse sort
Posts: 312
Joined: Sat Oct 08, 2005 09:12 AM
xBrowse sort
Posted: 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

Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Re: xBrowse sort
Posted: Wed Jan 14, 2009 12:46 PM
Try this:
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
Posts: 312
Joined: Sat Oct 08, 2005 09:12 AM
Re: xBrowse sort
Posted: Wed Jan 14, 2009 01:03 PM

Julio,

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

Best regards,
Detlef

Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Re: xBrowse sort
Posted: Wed Jan 14, 2009 02: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
Posts: 312
Joined: Sat Oct 08, 2005 09:12 AM
Re: xBrowse sort
Posted: Wed Jan 14, 2009 03: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

Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Re: xBrowse sort
Posted: Wed Jan 14, 2009 04:27 PM
Detlef,

Please, try this:
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
Posts: 312
Joined: Sat Oct 08, 2005 09:12 AM
Re: xBrowse sort
Posted: Wed Jan 14, 2009 05: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
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Re: xBrowse sort
Posted: Wed Jan 14, 2009 05: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

Continue the discussion