Hello,
Clicking on a header , the array is sorted with the data from this colum.
In some cases i want to add a second key , or column , like we can do in a index expression.
I tryed to add a new data to TXBrwColumn (bOrder) , but it seems to be too complicated.
How can it be done without changing the source from xbrowse or too add new data ?
Frank Demont
Xbrowse , autosort
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Xbrowse , autosort
#1. In case of browsing RDD / TDataBase
(a) If you already have an index on the required expression, assign the index tag name to oCol:cSortOrder := <indexTagName>.
(b) If no index exists on the required expression, you may create a temporary index like
INDEX ON <expression> TAG <temptag> TO <temp> MEMORY
and assign
oCol:cSortOrder := <temptag>
oCol:cOrdBag := <temp>
#2. In case of browsing RecordSet :
Just assign the two column names like:
oCol:cSortOrder := "FIRST,LAST,CITY"
#3. In case of browsing Array:
You need to have your own custom sort function, which returns 'A' if sorted on ascending order or 'D' if sorted on descending order and then assign your function as codeblock to oCol:cSortOrder := { |oCol| <yourfunction> }
(a) If you already have an index on the required expression, assign the index tag name to oCol:cSortOrder := <indexTagName>.
(b) If no index exists on the required expression, you may create a temporary index like
INDEX ON <expression> TAG <temptag> TO <temp> MEMORY
and assign
oCol:cSortOrder := <temptag>
oCol:cOrdBag := <temp>
#2. In case of browsing RecordSet :
Just assign the two column names like:
oCol:cSortOrder := "FIRST,LAST,CITY"
#3. In case of browsing Array:
You need to have your own custom sort function, which returns 'A' if sorted on ascending order or 'D' if sorted on descending order and then assign your function as codeblock to oCol:cSortOrder := { |oCol| <yourfunction> }
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
-
- Posts: 142
- Joined: Sun Oct 09, 2005 10:59 am
Re: Xbrowse , autosort
Thanks very much , very easy to implement !!!!!
Frank
Frank