zoukankan      html  css  js  c++  java
  • KendoUI:Grid控件的使用

    <div id=”grid”></div>

    <script th:inline=”javascript”>
    $(function(){

    $('#grid') .kendoGrid({
    dataSource : dataSource, //数据源加载
    pageable : { //分页信息选项设置
    input : true,
    numeric : false,
    refresh: true,
    pageSizes: true,
    buttonCount: 5
    },
    sortable : true, //可排序
    height : 430, //表格高度设置
    toolbar : [ //工具条,可使用模板自定义
    {
    name : "create",
    text : "添加"
    },
    {
    template :
    kendo.template($("#pageStyleSkinTemplAddTemplate").html())
    },
    {
    template :
    kendo.template($("#pageStyleSkinQueryTemplate").html())
    }
    ],
    columns : [ //表格列设置
    {
    field: "fileName", //dataSource中与data对应的域(field)的名称
    title: "风格名称", //表头名称
    200 //列宽
    },
    {
    field: "updaterId",
    title: "更新人",
    100
    },
    {
    field: "updateTime",
    title: "上传时间",
    200,
    format: "{0: yyyy-MM-dd HH:mm:ss}" //格式化时间
    },
    {
    command : [ //对行数据的操作
    {
    text:"编辑", //名称
    click: editFunction //自定义点击事件
    },
    {
    text:"下载",
    click: loadFunction
    },
    {
    name : "destroy", //调用dataSource中的删除方法
    text : "删除"
    }
    ],
    title : "操作", //表头名称
    width : "250px" //列宽
    }
    ],
    editable :
    {
    mode : "popup", //弹出窗口的编辑模式(行内编辑:”inline”)
    },
    messages : //分页条部分显示中文信息的设置
    {
    display : "Showing {0}-{1} from {2} data items",
    empty : "No data"
    }

    });


    });
    </script>

  • 相关阅读:
    操作系统指纹
    扫描工具
    ms08_067利用过程
    SQL注入攻击
    SMB/CIFS协议解析
    蓝桥杯 历届试题 大臣的旅费
    九度oj 题目1009:二叉搜索树
    蓝桥杯 算法提高 6-17 复数四则运算
    poj 2182 Lost Cows
    poj 2501 Average Speed
  • 原文地址:https://www.cnblogs.com/914556495wxkj/p/6492593.html
Copyright © 2011-2022 走看看