Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Matthew C. on Jan 28, 2008 08:28
open dhtmlx forum
Case Insensitive Sorting and row colours

You mention that there's a flexible way to have case insensitive sorting in the professional edition:

index.php?s=normal&q=1182&a=1153

">>I would have thought that (case insensitive) alphabetic sorting was "Standard" behaviour?
yes, the flexible way available only in pro edition, but you can switch any "str" sorting to case insentensive by next code modification"

I have the pro edition ... but I can't seem to find that command.  Also ... is there a way to set row color when sending data asynchronously through XML?

Answer posted by Support on Jan 28, 2008 10:17
There is no direct command, but pro version allows to define custom sorting rules
    http://dhtmlx.com/docs/products/dhtmlxGrid/samples/rows_columns_manipulations/pro_sort.html

So you can use something similar to next

mygrid.setCustomSorting(function(a,b,ord){
    var n=a.toString().toLowerCase();
    var m=b.toString().toLowerCase();
    if(order=="asc") return n>m?1:-1; else return n<m?1:-1;
},2);