Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by sachin on Dec 16, 2008 02:46
open dhtmlx forum
Radio button sorting order

Hi,

When ever I click on the radio button column available in Grid, Its sorting and the selected radio button row is moved to last.
In decending order, the selected radio button is becoming the first row.

But In the initial sort we want the radio button row should come first and in the decending it should be the last record.

With out effecting the Other columns sorting functionality, How can I sort the radio buttons in reverse order?


Thanks,
Sachin M

Answer posted by Support on Dec 16, 2008 04:41
You can define custom column sorting order for column in question ( pro version of grid only ) 
grid.setCustomSorting(function(a,b,ord){
          return (a<b?1:-1)*(ord=="asc"?1:-1); 
},INDEX);

where INDEX - index of column in question