KendoUI Grid分组、分页控件参数记录

$('#grid').kendoGrid({
    dataSource:{
        transport:{
            read:{  //读取
                url:"",  //请求地址
                type:"POST", //请求方法  POST  GET
                dataType:"json"  //数据类型    
            },
            update:{},//更新
            create:{}, //增加
            destroy:{},//删除
            parameterMap: function (options, operation) { //自定义请求参数
                if(operation=="read"){ //列举读取方法
                    return {Id:10};
                }
            }
        },
        group: {  //分组显示
            field: "",  //分组字段
            dir: "asc"  //排序方式  asc --- 升序  desc --- 降序
        },
         requestEnd: function (e) {//请求结束方法
            if(e.type=="read"){...}
         },
         error: function (e) {}//错误处理
        
    }//数据源
    selectable:"single row",//选择行方式  single row  选择单行  multiple ---多行  multiple cell ---允许选择多个单元格  single cell---单个单元格
    resizable:true, //大小是否可调
    scrollable:true, //滚动条
    groupable:false, //是否显示分组栏
    pageable: {      //分页
            refresh: true,  //是否显示刷新按钮
            messages: {     //分页显示信息(不定义则使用默认显示方案)
                display: "{0} - {1} 共 {2} 条数据",
                empty: "没有要显示的数据",
                page: "Page",
                of: "of {0}",
                itemsPerPage: " ",
                first: "首页",
                previous: "上一页",
                next: "下一页",
                last: "最后一页",
                refresh: "刷新",      
            },
            numeric: true,   //是否显示分页按钮      不定义默认为true
            previousNext: true, //是否显示翻页按钮   不定义默认为true
            info: true,         //是否显示分页信息  不定义默认为true
            buttonCount: 3     //显示分页按钮数量
    },
    columns: [{field:"Id",title:"编号",width:50}]  //列信息
    dataBound: function () {},  //数据绑定事件
    cancel: function () {},  //取消编辑事件
    editable: "inline"  //数据编辑方式   inline  ---行内编辑    popup--弹框编辑方式
})

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值