# Sorting TextGridCollections....

**URL:** <https://techcommunity.softwareag.com/t/sorting-textgridcollections/57297>\
**Category:** Forum\
**Tags:** Former-Crossvision-Products, Application-Composer\
**Created:** [April 12, 2006, 9:00pm UTC](https://techcommunity.softwareag.com/t/sorting-textgridcollections/57297 "2006-04-12T21:00:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![obecherer](https://avatars.discourse-cdn.com/v4/letter/o/f14d63/32.png) [@obecherer](https://techcommunity.softwareag.com/u/obecherer)\
**Post date:** [April 12, 2006, 9:00pm UTC](https://techcommunity.softwareag.com/t/sorting-textgridcollections/57297/1 "2006-04-12T21:00:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Bjoern\_Mueller](https://avatars.discourse-cdn.com/v4/letter/b/e9bcb4/32.png) [@Bjoern\_Mueller](https://techcommunity.softwareag.com/u/Bjoern_Mueller)\
**Post date:** [April 13, 2006, 4:49pm UTC](https://techcommunity.softwareag.com/t/sorting-textgridcollections/57297/2 "2006-04-13T16:49:11Z")

</div>

Hola! 😉

…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

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:38pm UTC](https://techcommunity.softwareag.com/t/sorting-textgridcollections/57297/3 "2021-04-02T14:38:32Z")

</div>


