The sortGrid function in grid.custom.js takes a colname and if this column is sortable calls sortData as follows:
$t.sortData(colname, idx, reload);
However sortData requires an index (in the form jqgh_ + colname) to be able to re-apply the sort image and correctly set the sortname.
Here is a snippet form the sortData code that relies on the index having 'jqgh_' as a prefix to the colname.
$(“tr th div#jqgh_”+ls+” img”,thd).remove();
$(“tr th div#jqgh_”+ls,thd).parent().removeClass(ts.p.sortclass);
iId = index.replace('.',”\\.”);
$(“tr th div#”+iId,thd).append(imgs).parent().addClass(ts.p.sortclass);
ts.p.lastsort = idxcol;
index = index.substring(5);
ts.p.sortname = ts.p.colModel[idxcol].index || index;
so = ts.p.sortorder;
if(onSortCol) {onSortCol(index,idxcol,so);}
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top