Page 1 of 1
xBrowse - how to oXbrw:gotop() after header is click?
Posted: Fri May 27, 2022 2:51 am
by hua
If user select a header to sort on or change ascending/descending order, how do I get xbrowse to always perform a oXbrw:goTop() afterwards?
Re: xBrowse - how to oXbrw:gotop() after header is click?
Posted: Fri May 27, 2022 3:11 am
by nageswaragunupudi
Re: xBrowse - how to oXbrw:gotop() after header is click?
Posted: Fri May 27, 2022 3:20 am
by hua
Thanks for the prompt reply Rao.
But doesn't seem to work with FWH11.08. I ended up with an extra column called BONSORT
Re: xBrowse - how to oXbrw:gotop() after header is click?
Posted: Fri May 27, 2022 4:57 am
by nageswaragunupudi
Sorry, FWH11.08 is more than ten year old and did not support this.
Let me see the source code of FWH1108 and advise you.
Re: xBrowse - how to oXbrw:gotop() after header is click?
Posted: Fri May 27, 2022 10:48 am
by nageswaragunupudi
Please try:
Code: Select all | Expand
oBrw:bLClickHeaders := { |r,c,f,o| If( EMPTY( o:cOrder ),,(o:oBrw:GoTop(),o:oBrw:Refresh() ) ) }
Re: xBrowse - how to oXbrw:gotop() after header is click?
Posted: Mon May 30, 2022 2:46 am
by hua
Thank you very much Rao. It works!
On another topic, is it possible to get a sorting based on a group of column ?
For example, if click on header of col A, sorting is actually col A+col B>
TIA
Re: xBrowse - how to oXbrw:gotop() after header is click?
Posted: Mon May 30, 2022 2:56 am
by nageswaragunupudi
DBF files?
Re: xBrowse - how to oXbrw:gotop() after header is click?
Posted: Mon May 30, 2022 3:00 am
by hua
Yes. Is it as simple as creating an index with the expression A+B?
Re: xBrowse - how to oXbrw:gotop() after header is click?
Posted: Mon May 30, 2022 4:10 am
by nageswaragunupudi
hua wrote:Yes. Is it as simple as creating an index with the expression A+B?
Yes, and a little more.
Also assign
oCol:cSortOrder := <OrderTag>
and
oCol:cOrdBag := <cOrdBag> // if separate
Example (DBFCDX):
INDEX ON COLA+COLB TAG IDXAB TO TMP MEMORY
oCol:cSortOrder := "IDXAB"
oCol:cOrdBag := "TMP"
Re: xBrowse - how to oXbrw:gotop() after header is click?
Posted: Mon May 30, 2022 8:53 am
by hua
Thank you very much Rao!