yui - How can I use a custom sortFunction with a Grails gui:datatable tag? -
yui - How can I use a custom sortFunction with a Grails gui:datatable tag? - i have datatable in grails several sortable columns. unfortunately, sort case-sensitive default, such "zed" shown before "alice". want add together custom case-insensitive sort function. i'll start sorting username column in manner. i have read sortoptions , sortfunction @ http://developer.yahoo.com/yui/datatable/ can't seem work. i added next javascript list.gsp: var caseinsensitivesortfunction = function(a, b, desc, field) { // see http://developer.yahoo.com/yui/datatable/ , 'sortfunction' // set function name sortfunction alternative // deal empty values if (!yahoo.lang.isvalue(a)) { homecoming (!yahoo.lang.isvalue(b)) ? 0 : 1; } else if (!yahoo.lang.isvalue(b)) { homecoming -1; } homecoming yahoo.util.sort.compare(string(a).tolowercase(), string(b).tolowercase(), desc); }; and here datatable definition...