博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
EasyUI中DataGrid构建复合表头
阅读量:4499 次
发布时间:2019-06-08

本文共 652 字,大约阅读时间需要 2 分钟。

在使用easyui的DataGrid控件时,构建复合表头就显得非常简单了。只需要在使用columns属性时通过数组的方式编写列名即可。如我们需要构建成一个如下的表头:

Columns的代码如下:

columns: [[                    { field: '_id', title: '行号', fixed: true, rowspan:2 },                    { field: '_j', title: '铁路局', fixed: true, colspan:2 }                ], [                    { field: '_id', title: '京局', fixed: true },                    { field: '_j', title: '哈局', fixed: true }                ]]

但是这里需要注意一点:DataGrid在构建复合表头时,合并单元格使用的colspan和rowspan的值一定要是数字,不能是字符。如

{ field: '_cj', title: '侧架', width: 20, colspan: 9 }

而不能是

{ field: '_cj', title: '侧架', width: 20, colspan: ‘9’ }

转载于:https://www.cnblogs.com/itzhangxp/p/4055039.html

你可能感兴趣的文章
2.安装中国版本的firefox
查看>>
mysql导出CSV格式的文件
查看>>
NetWaiting 完美卸载方法
查看>>
SpringBoot集成MybatisPlus
查看>>
人生规划和GTD——“知”、“得”与“合”
查看>>
Linux学习笔记(13)-进程通信|命名管道
查看>>
Ubuntu 目录结构
查看>>
Linux笔记一
查看>>
[ 51Nod 1327 ] 棋盘游戏
查看>>
Windows 10 内置管理员无法打开Metro应用方法
查看>>
MySql按每日、每周、每月分组统计数据
查看>>
[转]spring4.x注解概述
查看>>
工作两周总结
查看>>
十天学会易语言图解教程+快速入门
查看>>
安卓第一天
查看>>
11.26号
查看>>
lintcode-easy-Hash Function
查看>>
lintcode-easy-Space Replacement
查看>>
lintcode-medium-Print Numbers by Recursion
查看>>
springboot集成Spring Session
查看>>