First, we will check Paging Overview and Basic Examples about the paging in SMART datagrid.
You can also randomly specify the data set which will be displayed in each page apart from the data row group which is currently created in the grid. You can call setPageAndRows and specify when the page is changed, or call GridView.pageRows within the page change event handler and specify it.
grid.onPageIndexChanged = function (grid, oldPage, newPage) {
var rows = [];
if (ds.rowCount() > 0) {
while (rows.length < 5) {
var r = parseInt(Math.random() * ds.rowCount());
if (rows.indexOf(r) < 0) {
rows.push(r);
}
}
}
grid.setPageRows(rows);
};
btnFirst2_click: function (ev) {
var p = grdMain2.pageIndex() * 10;
grdMain2.setPageAndRows(0, [p + 2, p + 4, p + 3, p + 5, p + 7]);
},