zoukankan      html  css  js  c++  java
  • easyui 合并单元格

    $(function () {
            $('#datalist').datagrid({
                title: '三项岗位人员统计',
                iconCls: 'icon-save',
                singleSelect: true,
                 700,
                height: 350,
                nowrap: false,
                fit: true,
                striped: false,
                url: '/Provider/HandlerQualificationsP.ashx?method=threet&dept_id=000001',
                remoteSort: false,
                idField: 'DicQualificationID',
               
                columns: [[
                       { field: 'title1', title: '资格证名称',  120, align: 'center' },
                       { field: 'title2', title: '资格证名称',  120, align: 'center' },
                       { field: 'zgzname', title: '资格证名称',  120, align: 'center' },
                       { field: 'rowdata1', title: '资格证名称',  120, align: 'center' }
    				]],
               
                rownumbers: true,
                onLoadSuccess: function (rowData) {
    
                    var merges2 = [{
                        field:'title1',
                        index: 0,
                        colspan: 2,
                        rowspan: 2
                    },
                    { 
                        index: 2,
                        field: 'title1',
                        rowspan:4
                    },
                      {
                        index: 7,
                        field: 'title1',
                        rowspan:9
                    },
                    {
                        index: 2,
                        field: 'title2',
                        rowspan: 2
                    },
                    {
                        index: 4,
                        field: 'title2',
                        rowspan: 2
                    }
                    ];
    
    
                        for (var i = 0; i < merges2.length; i++)
                            $('#datalist').datagrid('mergeCells', {
                                index: merges2[i].index,
                                field: merges2[i].field,
                                colspan: merges2[i].colspan,
                                rowspan: merges2[i].rowspan
                            });
     
                },
                toolbar: [{
                    id: 'btnadd',
                    text: '添加',
                    iconCls: 'icon-add',
                    handler: function () {
                        DicAdd()
                    }
                }, '-', {
                    id: 'btncut',
                    text: '修改',
                    iconCls: 'icon-cut',
                    handler: function () {
                        DicEdit()
                    }
                }, '-', {
                    id: 'btnsave',
                    text: '删除',
    
                    iconCls: 'icon-remove',
                    handler: function () {
                        delData();
                    }
                }]
            });
    
        });
    

      

  • 相关阅读:
    帮助智力障碍的可怜儿童
    PE556
    ZJOIDay2T1 BB题解
    CTSC2016游记
    再次被老爸钦点退役
    欧拉筛
    考据
    51nod 1020 逆序排列(动态规划)
    51nod 1186 质数检测(Miller-Rabin算法)
    大整数类模板
  • 原文地址:https://www.cnblogs.com/gwazy/p/2778000.html
Copyright © 2011-2022 走看看