Sorting TextGridCollections....

hola!

i`m using a Textgridsss2 with csvcolumns - sortable by columnclick.

→ some values should be sorted alphanumerical, others should be sorted numerical.

for those columns i already have the SortAlgo ( via Collections.sort) and
try to use it by finding the actual SortInfo in the adapter :

SORTInfo mySort = myCollection.findSortInfo();

String sortProp = mySort.getSortProperty();

if(sortProp.equals(<INTSORT - SPALTE>){
// Sort - algo, also regarding ascending/descending

}

where should i place the code in the adapter, so it will be executed everytime, an column is clicked by user ?

i`m sure, there exists a better way, maybe someone can help me?

thnx

Hola! :wink:

…please have a look into the docu: there is a special section in TEXTGRID chaper explaining the sorting. There is a code example as well…

Bjoern