Normally I populate the grid with non formatted numbers and use a formatter to format them.
Main Topics
Browse All TopicsHi All,
I have implemented Number sorting as mentioned in the below(code).
I have placed the function that i am setting for the column that is to be sorted.
This column contains formatted amount (e.g. $2,000.00), so flex considers it as String and sorts the data as String.
In the function pasted below i am removing the formatting and then converting the unformatted string into a Number.
This function works fine when the amount of data is not large. i.e. < 1000 records in datagrid.
But when the records are > 1000, the sorting takes long time and most of the time the script takes more than 30 secs to run.
The reason here is that when the amount of data is large then the comparisons increase and the method which i am calling in this method gets called twice as many times as the numericSort Function.
This causes the delay and the error is thrown.
IS THERE ANY OTHER WAY TO IMPLEMENT NUMERIC SORTING WHICH IS LESS TIME CONSUMING THAN THIS WAY?
Please help as i need a solution to this urgently.
Thanks.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: PluckaPosted on 2009-08-26 at 00:20:35ID: 25185031
Perhaps the removeStringFormatting doesn't remove the commas that occur in numbers > 999