Required library edition:
Required library file: dhtmlxgrid.js
set custom sorting (custom sort has three params - valueA,valueB,order; where order can be asc or des)
//second column is sorted by number of symbols in text mygrid.setCustomSorting(sort_custom,1); ... function sort_custom(a,b,order){ var n=a.length; var m=b.length; if(order=="asc") return n>m?1:-1; else return n<m?1:-1; }
See also: sortRows