zoukankan      html  css  js  c++  java
  • KendoUI Grid分组、分页控件参数记录

     1 $('#grid').kendoGrid({
     2     dataSource:{
     3         transport:{
     4             read:{  //读取
     5                 url:"",  //请求地址
     6                 type:"POST", //请求方法  POST  GET
     7                 dataType:"json"  //数据类型    
     8             },
     9             update:{},//更新
    10             create:{}, //增加
    11             destroy:{},//删除
    12             parameterMap: function (options, operation) { //自定义请求参数
    13                 if(operation=="read"){ //列举读取方法
    14                     return {Id:10};
    15                 }
    16             }
    17         },
    18         group: {  //分组显示
    19             field: "",  //分组字段
    20             dir: "asc"  //排序方式  asc --- 升序  desc --- 降序
    21         },
    22          requestEnd: function (e) {//请求结束方法
    23             if(e.type=="read"){...}
    24          },
    25          error: function (e) {}//错误处理
    26         
    27     }//数据源
    28     selectable:"single row",//选择行方式  single row  选择单行  multiple ---多行  multiple cell ---允许选择多个单元格  single cell---单个单元格
    29     resizable:true, //大小是否可调
    30     scrollable:true, //滚动条
    31     groupable:false, //是否显示分组栏
    32     pageable: {      //分页
    33             refresh: true,  //是否显示刷新按钮
    34             messages: {     //分页显示信息(不定义则使用默认显示方案)
    35                 display: "{0} - {1} 共 {2} 条数据",
    36                 empty: "没有要显示的数据",
    37                 page: "Page",
    38                 of: "of {0}",
    39                 itemsPerPage: " ",
    40                 first: "首页",
    41                 previous: "上一页",
    42                 next: "下一页",
    43                 last: "最后一页",
    44                 refresh: "刷新",      
    45             },
    46             numeric: true,   //是否显示分页按钮      不定义默认为true
    47             previousNext: true, //是否显示翻页按钮   不定义默认为true
    48             info: true//是否显示分页信息  不定义默认为true
    49             buttonCount: 3     //显示分页按钮数量
    50     },
    51     columns: [{field:"Id",title:"编号",50}]  //列信息
    52     dataBound: function () {},  //数据绑定事件
    53     cancel: function () {},  //取消编辑事件
    54     editable: "inline"  //数据编辑方式   inline  ---行内编辑    popup--弹框编辑方式
    55 })
  • 相关阅读:
    Vuecli3项目引入网页视频流媒体播放器EasyPlayer.JS报videojs not definde错误如何解决?
    穷人和富人的区别
    如何使用PCATTCP测试局域网传输速度
    DirectFB同时显示到X11和VNC上
    使用Openssl生成CA及签发证书方法
    内存泄漏定位
    关于在C++开发的项目中引用后缀名为.c文件的一句话提醒
    在Win32下建立GTK开发环境
    GTK/DFB中的WaitCursor
    GTK+/DFB优化
  • 原文地址:https://www.cnblogs.com/szxbAndwjs/p/7285533.html
Copyright © 2011-2022 走看看