I really needed this function because when you edit a lot of product it's a lot of work to navigate to the current page for each product..
This extension makes i possible to keep the current page when edit a product and the navigate with the backbutton.
$("#products-grid").kendoGrid({
dataSource: dataSource,
pageable: {
change: function (e) {
var current = parseInt(this.dataSource.page());
var hashedPage = parseInt(location.hash.replace("#", ""));
var equal = (parseInt(hashedPage) == parseInt(current));
if (!equal) {
location.hash = current;
}
},
refresh: true,
pageSizes: [@(gridPageSizes)]
},
......
$(document).ready(function () {
$(window).on('load', function () {
var hashedPage = parseInt(location.hash.replace("#", ""));
var grid = $('#products-grid').data('kendoGrid');
grid.dataSource.query({ page: parseInt(hashedPage), pageSize: 10 });
});
});