Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Manolis Samoilis on Jun 06, 2007 18:20
open dhtmlx forum
Sorting is not working properly

The sorting is not working correctly for numbers with comma (,) as decimal point and dot(.) as group digit.

and the sorting of dates, when the format is dd/mm/YYYY, is similar to str sorting.

How to resolve this issue?

Answer posted on Jun 07, 2007 10:38
The sorting use default javascript functionality to convert data to sortable types

For numbers it use parseFloat, which not works for numbers with comma
For dates it use Date.parse which can recognize only dates in standard format.

In both cases you can define custom sorting routines which will sort data in any custom way. ( You can check samples/pro_sort.html as example )
Answer posted by Andrei (Support) on Dec 06, 2014 16:36

Not much can be said in addition to the reply above, but you also can check window dhtml and javascript event and find out what we have probably missed in our explanation.