xBrowse autosort

xBrowse autosort

Postby Detlef Hoefner » Tue Jan 06, 2009 6:34 pm

Hi all,

i have a xBrowse with array as data source and in autosort mode.
When changing the sort order of the browse by clicking the col headers i would like to perform a 'go top'.

Is this possible? If yes, how?

Thanks for all hints.
Regards,
Detlef
User avatar
Detlef Hoefner
 
Posts: 312
Joined: Sat Oct 08, 2005 9:12 am
Location: Germany

Re: xBrowse autosort

Postby JC » Tue Jan 06, 2009 7:09 pm

By the method oCol:bRClickHeader, you can do it!

Code: Select all  Expand view
oCol := oBrw:oCol( cHeader )
oCol:bRClickHeader := {|| TEST->( dbGoTop() ) }
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 autosort

Postby Detlef Hoefner » Tue Jan 06, 2009 9:26 pm

Julio,

thanks for your suggest.
It doesn't work, but you pointed me the way how to do it.

Sort oder is changed with a left click on the header.
And my data source is an array.
So i tried out the following which works as expected.
Code: Select all  Expand view
oBrw:aCols[ n ]:bLClickHeader := { || oBrw:GoTop() }


Thanks again Julio,
Detlef
User avatar
Detlef Hoefner
 
Posts: 312
Joined: Sat Oct 08, 2005 9:12 am
Location: Germany

Re: xBrowse autosort

Postby JC » Tue Jan 06, 2009 9:35 pm

Detlef,

Code: Select all  Expand view
oBrw:aCols[ n ]:bLClickHeader

is the same of 

oCol := oBrw:oCol( cHeader )
oCol:bLClickHeader


But your solution is wonderful! It's much more better!
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 37 guests

cron