[flexcoders] Re: Sorting XML number values in datagrid

2009-09-10 Thread turbo_vb
Look at sortCompareFunction for DataGridColumn. -TH --- In flexcoders@yahoogroups.com, AJC2357 ajc2...@... wrote: Hi all, Looking for a simple solution to properly sorting number values in a datagrid. I'm sure many of you have run across this limitation. Trying to sort something like

[flexcoders] Re: Sorting XML number values in datagrid

2009-09-10 Thread valdhor
Create a numeric compare function like the following: private function numericCompareFunc(itemA:Object, itemB:Object):int { return ObjectUtil.numericCompare(itemA.itemToCompare, itemB.itemToCompare); } Then set this function to the sortCompareFunction of your datagrid column: