Skip to main content
Participant
July 6, 2007
Question

Custom datagrid sort

  • July 6, 2007
  • 1 reply
  • 236 views
Hello,
I have a datagrid that has a row that contains information similar to this: 1,2,3,4,T4,T4,5,6,..17,29,..43,T44,T44,45.. and so on.. I hope you get the idea.. if an element appears more than one time, it has a "T" at the beginning (this data is from a database and I have to display it in this way). I have to be able to sort this numerically (making the sort function somehow ignore that "T")... i know datagrid only sorts strings, but using a Listener and some other things ( check this out http://www.flash-creations.com/notes/servercomm_database.php ) I managed to make it sort numbers.
However, the function doesn't work properly it some elements have that "T" at the beginning. Is there an elegant way to do this? (other than writing my own sorting function - maybe bubble sort - sorting the dataprovider and then repopulating the datalist with the sorted dataprovider)
This topic has been closed for replies.

1 reply

July 9, 2007
Could you put the "T" in a different column or does it have to be in the same column as the number?