Flexcomps’s Weblog

Datagrid : Sorting Numeric data having commas

Posted by: Yogesh Puri on: September 22, 2008

The post is regarding a solution in case you have some numeric data with commas, which is going to be shown in a datagrid with sorting enabled. If you use the Array.NUMERIC as an option on the DataGridColumn.sortOptions with values having comma the results are not as desired. So what we have done is use the DataGridColumn.sortCompareFunction to use a custom sorting function and a toNumeric function to convert the comma separated data to Numeric values where as labels of datagrid remains same as with commas. Check the result below and you can download code from here

AS3 Datagrid sorting

AS3 Datagrid sorting

2 Responses to "Datagrid : Sorting Numeric data having commas"

hi, i like your data grid and as3 example.. works very well. At this point, how would you modify the code to: stylize the font face, and link color, and then attach either a url via xml and/or load another movie swf into another container when the user clicks one, outside the data grid?

Response to “Datagrid : Sorting Numeric data having commas”

Leave a Reply

 

September 2008
M T W T F S S
« Aug   Oct »
1234567
891011121314
15161718192021
22232425262728
2930  

Blog Stats

  • 94,229 hits