the paging/sorting in my custom kengo-grid-plugin on the pop-up is not working properly. It just stays on the same page when page no-2,3,4.. is clicked. The webpage has a button on the click of which It brings the grid data dynamially on pop-up based on some search criteria.
here is the generic pluggin :-
(function ($) {
$.fn.genericPlugin = function (configuration) {
$(this).kendoGrid({
editable: configuration.editable,
pageable: configuration.pageable,
sortable: configuration.sortable,
groupable: configuration.groupable,
pageSize: configuration.pageSize,
autobind:configuration.autobind,
autoSync: configuration.autoSync,
selectable: configuration.selectable,
serverPaging: configuration.serverPaging,
serverSorting:configuration.serverSorting,
dataSource: configuration.dataSource,
columns: configuration.columns,
navigatable: configuration.navigatable,
schema: configuration.schema
});
}
}(jQuery));
and here is how i am calling this pluggin :-
var grid = $("#PopUpGrid").data("kendoGrid");
$("#PopUpGrid").genericPlugin(grid.dataSource.read());
and following is the pop-up in which we have added the generic grid. This is only for demo purpose and should be commented after that.
$(document).ready(function () {
var win = $("#window").kendoWindow({
actions: ["Custom", "Pin", "Refresh", "Maximize", "Minimize", "Close"],
height: "500px",
title: "Contact List",
visible: false,
position: {
top: 100,
left: 100
},
resizable: true,
pageable: true,
sortable:true,
width: "1200px"
}).data("kendoWindow").refresh();
});
$("#openButton").click(function () {
var win = $("#window").data("kendoWindow").refresh();
win.center();
win.open();
var grid = $("#PopUpGrid").data("kendoGrid");
if (ValidateSearchText()) {
$scope.ShowSearchTextMissing = false;
TurnOnProgress();
$("#PopUpGrid").genericPlugin(grid.dataSource.read());
}
});