When endless scrolling is implemented, manual DataSource operations using the DataSource APIs(query, page, sort, etc.) do not work as expected. The endless scrolling settings are causing paging issues.
The first page is only accessible, and when scrolling down the reads continue to occur.
The endless scrolling settings should not interfere with manual dataSource operations.
kendo.ui.Pager.fn._refreshClick = function (e) {
e.preventDefault();
var grid = $("#grid").getKendoGrid();
grid.dataSource.options.endless = null;
grid._endlessPageSize = 20;
grid.dataSource.pageSize(20);
}
kendo.ui.Pager.fn._refreshClick = function (e) {
e.preventDefault();
var grid = $("#grid").getKendoGrid();
window.restoreScroll = true;
window.scolledValue = grid.content[0].scrollTop;
grid.dataSource._data.empty();
grid.dataSource._pristineData = [];
grid.dataSource.read();
}