FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour XBROWSE activate or deactivate AUTOSORT
Posts: 301
Joined: Fri Jun 01, 2007 09:07 AM
XBROWSE activate or deactivate AUTOSORT
Posted: Wed Feb 08, 2012 10:50 PM

Hi all,
I want to have unsorted XBROWSE in start and after that is it possible to activate or deactivate AUTOSORT

Something like:
oBrw:lAutoSort := .t. ; oBrw:Refresh()
or
oBrw:lAutoSort := .f. ; oBrw:Refresh()

Best Regards,

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: XBROWSE activate or deactivate AUTOSORT
Posted: Wed Feb 08, 2012 11:18 PM
To DeActivate Autosort:
Code (fw): Select all Collapse
aSaveSort := oBrw:cSortOrders  // aSaveSort is a static variable
oBrw:cSortOrders := nil

To Reactivate
Code (fw): Select all Collapse
oBrw:cSortOrders := aSaveSort
Regards



G. N. Rao.

Hyderabad, India
Posts: 301
Joined: Fri Jun 01, 2007 09:07 AM
Re: XBROWSE activate or deactivate AUTOSORT
Posted: Fri Feb 10, 2012 01:32 AM

Going good,
Thanks,
Just one more question,
Is it possible if remove autosort to return UNSORTED xbrowse and remove (ascending-descending) sort pointer on header ?

Best regards,

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: XBROWSE activate or deactivate AUTOSORT
Posted: Fri Feb 10, 2012 03:32 AM
avista wrote:Going good,
Thanks,
Just one more question,
Is it possible if remove autosort to return UNSORTED xbrowse and remove (ascending-descending) sort pointer on header ?

Best regards,

No.
1) To remove ascend/descend buttons on header, please also include these lines:
Code (fw): Select all Collapse
oBrw:cSorts := ""
oBrw:Refresh()

2) XBrowse, by itself, can not restore natural order. We need to do it manually inside the above code.
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion