Actually you have to implement change listener of the grid pager:
$('#grid').kendoGrid({
...
pageable: {
change: function (e){
location.hash = e.index; // or set the cookie
}
},
});
And then listen for the location (or cookie) changes. Example for location:
$(window).on('hashchange', function() {
var gridPager = $('#grid').data("kendoGrid").pager;
var gridPage = gridPager.page(), currentPage = getPageFromBrowserWithSomeDefault();
// Update only if necessary since kendo does not do extra comparison
// UPD: if server returns no results gridPage would be 0 instead of 1
if (gridPage > 0 && gridPage != currentPage) {
gridPager.page(currentPage);
}
});
The tricky thing is to make the direct navigation possible. Since in the beginning the datasource knows nothing about the number of items, it won't allow requesting page other than the first one. So be sure to do request it:
$('#grid').kendoGrid({
...
autoBind: true,
});
once the responce aquired and processed you can just trigger the 'hashchange' handler to update the grid (for example in 'success' handler of your ajax call):
$(window).trigger('hashchange');