kendo网格的分页不能用于弹出窗口 [英] paging for kendo grid not working on pop-up
问题描述
弹出窗口中我的自定义kengo-grid-plugin中的分页/排序无法正常工作。当点击页面编号为-2,3,4 ..时,它只会停留在同一页面上。网页上有一个按钮,根据一些搜索条件,它会弹出窗口中的网格数据。
这里是通用插件: - < br $> b $ b
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 :-
// A generic kendo grid which is highly configurable
(function ($) {
$.fn.genericPlugin = function (configuration) {
// var cachedConfi = 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));
以下是我如何调用此插件: - < br $>
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 = window.parent.$("#PopUpGrid").data("kendoGrid");
var grid = $("#PopUpGrid").data("kendoGrid");
if (ValidateSearchText()) {
$scope.ShowSearchTextMissing = false;
TurnOnProgress();
// $("#PopUpGrid").genericPlugin($scope.gridOptions.datasource.read());
$("#PopUpGrid").genericPlugin(grid.dataSource.read());
}
});
推荐答案
){
.fn.genericPlugin = function (配置){
// var cachedConfi = configuration;
.fn.genericPlugin = function (configuration) { // var cachedConfi = 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,
列:配置tion.columns,
navigatable:configuration.navigatable,
schema:configuration.schema
});
}
}(jQuery));
(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));
以下是我如何调用此插件: - < br $>
and here is how i am calling this pluggin :-
var grid =
这篇关于kendo网格的分页不能用于弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!