I'm using Slickgrid but I'd prefer not to use slick.model.js
. How can I write grid.onSort
to sort the lines of my data set?
My code uses the standard template:
$(function() {
var data = [ ... ];
grid = new Slick.Grid($("#myGrid"), data, columns, options);
grid.onSort = function(sortCol, sortAsc) {
sortdir = sortAsc ? 1 : -1;
sortcol = sortCol.field;
// ??
};
})