zoukankan      html  css  js  c++  java
  • KendoUI之kendoGrid服务端分页

    parameterMap:设定传递给服务器的当前页数与每页大小,django下用get方法有效,post方法无法取得这2个参数
    shema.total:设定总行数
    serverPaging: true //设定服务器来实现分页功能
    var ds = new kendo.data.DataSource ({
        transport: {
            read: {
                url: 'xxx',
                type: 'GET',    //X GET
                dataType: 'json',
                contentType: 'application/json; charset=utf-8',
            }
            ,parameterMap: function (options, operation) {  //X
                if (operation == "read") {
                    return {page:options.page,pageSize:options.pageSize};
                }
            }
    
        }
        ,schema: {
            total : function(d) {
                return {{task_counts}};
                //return 100000000000;   //总条数
            }
        }
        ,batch: true        //X    
        ,pageSize: 15       //X    
        ,serverPaging: true //X
    });
    
    window.dataBindingLoaded = false;
    $("#grid").kendoGrid({
    dataSource: ds,
    //...
  • 相关阅读:
    codefoces 1405 D Tree Tag
    洛谷P3413 萌数
    数位DP模板
    leetcode 统计所有可行路径
    Josephus Transform 加速置换
    牛客IOI周赛18-提高组 排列
    Find a way HDU
    Oil Deposits HDU
    Fire! UVA
    Pots POJ
  • 原文地址:https://www.cnblogs.com/flowjacky/p/4761456.html
Copyright © 2011-2022 走看看