|
. . .
var grid = new ej.grids.Grid({
dataSource: data,
allowPaging:true,
dataBound:Bound,
actionBegin:begin,
columns: [
. . .
]
});
grid.appendTo('#Grid');
function Bound(e){
var pager = document.getElementsByClassName('e-gridpager')[0].ej2_instances[0];
var old = pager.click;
pager.click = function (args) {
old.call(this, args);
// here you can add conditions
args.cancel = true; // cancels the pager refresh
};
}
function begin(e) {
if (e.requestType === 'paging') {
e.cancel = true; // cancels the grid paging
}
} |