FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Auto sort 2 columns in xbrowse?
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Auto sort 2 columns in xbrowse?
Posted: Sun Nov 06, 2022 02:26 AM

Mr. Rao:

In xBrowse is it possible to auto sort 2 or more columns? For example, I want to sort by product brand and then by product code, is it possible?

Best regards

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Auto sort 2 columns in xbrowse?
Posted: Sun Nov 06, 2022 03:34 AM

if it is DBF:

a) if you have an index on brand + code, assign that index tag name to oCol:cSortOrder

b) otherwise create a temporary index and assign that index tag name to oCol:cSortOrder and the index name to oCol:cOrdBag.

For Recordset, rowset, etc.

oCol:cSortOrder := "brand,code"

Regards



G. N. Rao.

Hyderabad, India
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: Auto sort 2 columns in xbrowse?
Posted: Sun Nov 06, 2022 07:28 PM

Mr. Rao:

I apologize for not giving complete information, I use xBrowse with RecordSet,

so my idea is that by clicking on the brand column header, then clicking on the

product column header, they are sorted by product within each brand, just like excel does,

¿is it possible?

Best regards

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero

Continue the discussion