I have a dGrid component in my application. In it I have custom sorting method.
var grid = new (declare([Grid, Pagination]))({
store: new Memory({ data: data, idProperty: 'id' }),
columns: columns,
pagingLinks: 1,
pagingTextBox: true,
firstLastArrows: true,
pageSizeOptions: [10, 15, 25]
}, 'domID');
grid.on('dgrid-sort', function (event) {
event.preventDefault();
grid.set('sort', function (a, b) {
*sorting logic*
grid.updateSortArrow(event.sort, true);
})
My dGrid sorts itself just like I need it to. But now I have problem with paging. When I change page in my dGrid, it goes back to standard sorting from array prototype. Any ideas what to do?