Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Raghu on Oct 17, 2008 03:58
open dhtmlx forum
Custom sorting

Hi,
Custom sorting is not working for the descending order.
First time when you click on the header it will sort it in the asc order.
Then any more clicks on the same header doesn't change the rows order.
Answer posted by Support on Oct 17, 2008 05:22
Please check code of your sorting method, it has 3 parameters, first and seconf used for comparable values, third one provides current sorting order.

function custom_sort(a,b,ord){
     return (a>b?1:-1)*(ord=="asc"?1:-1);
}