使用客户端Kendo UI Grid实现服务器端分页?

编程入门 行业动态 更新时间:2024-10-28 00:19:31
本文介绍了使用客户端Kendo UI Grid实现服务器端分页?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

谁能告诉我如何使用客户端Kendo UI Grid来实现服务器端分页? 我使用下面的方法.

Can anyone tell me how can I implement server-side paging with client-side Kendo UI Grid? I use below method.

如果有人使用此方法,请帮忙.

if any one use this method please help.

$(document).ready(function () { function loadGrid(){ $.ajax({ ..... data: JSON.stringify({ //skip: skip, //take: take, }), success: function (result) { var datsource = new kendo.data.DataSource({ data: result.d, schema: { model: { id: "TemplateID", fields: {.... } } }, serverPaging: true, pageSize: 10, }); $("#grdOtherBomRequest").kendoGrid({ dataSource: datsource, serverFiltering: true, serverSorting: true, serverPaging: true, columns: [{....] }); } });

推荐答案

您可以在telerik的演示页面上查看示例: demos.telerik/kendo-ui/grid/remote -数据绑定

You can take a look at the example on telerik's demo page: demos.telerik/kendo-ui/grid/remote-data-binding

最重要的内容在下面的配置中列出(serverPaging,可分页).该服务还必须实现服务器分页.例如,您可以看一下telerik演示服务: github /telerik/kendo-ui-demos-service

The most important are listed in the config below (serverPaging, pageable). Also the service has to implement server paging. For an example you can take a look on the telerik demo service: github/telerik/kendo-ui-demos-service

$(document).ready(function() { $("#grid").kendoGrid({ dataSource: { type: "odata", transport: { read: "//demos.telerik/kendo-ui/service/Northwind.svc/Orders" }, schema: { model: { fields: {} } }, pageSize: 20, serverPaging: true, serverFiltering: true, serverSorting: true }, filterable: true, sortable: true, pageable: true, columns: [] }); });

更多推荐

使用客户端Kendo UI Grid实现服务器端分页?

本文发布于:2023-11-22 23:47:45,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1619376.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:分页   服务器端   客户端   UI   Kendo

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!