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();
                    }
                }]
            });
    
        });
    

      

  • 相关阅读:
    信息检索重点关键字
    信息检索重点关键字
    信息检索重点关键字
    信息检索关键词部分
    信息检索关键词部分
    信息检索关键词部分
    输入五个国家的名称按字母顺序排列输出
    把一个整数按大小顺序插入已排好序的数组中
    快放假了
    清炒苦瓜
  • 原文地址:https://www.cnblogs.com/gwazy/p/2778000.html
Copyright © 2011-2022 走看看