jqgrid 合并表头
参考:http://www.trirand.com/jqgridwiki/doku.php?id=wiki:groupingheadar
jQuery("#表格id").jqGrid({
...
colNames: ['Date', 'Client', 'Amount', 'Tax', 'Total', 'Closed', 'Shipped via', 'Notes'],
colModel: [
{name: 'invdate', index: 'invdate', width: 80, align: 'center', sorttype: 'date',formatter: 'date', formatoptions: {newformat: 'd-M-Y'}, datefmt: 'd-M-Y'},
{name: 'name', index: 'name', width: 70 },
{name: 'amount', index: 'amount', width: 75, formatter: 'number', sorttype: 'number', align: 'right'},
{name: 'tax', index: 'tax', width: 75, formatter: 'number', sorttype: 'number', align: 'right'},
{name: 'total', index: 'total', width: 75, formatter: 'number', sorttype: 'number', align: 'right'},
{name: 'closed', index: 'closed', width: 75, align: 'center', formatter: 'checkbox', edittype: 'checkbox', editoptions: {value: 'Yes:No', defaultValue: 'Yes'}},
{name: 'ship_via', index: 'ship_via', width: 100, align: 'center', formatter: 'select', edittype: 'select', editoptions: {value: 'FE:FedEx;TN:TNT;IN:Intim', defaultValue: 'Intime'}},
{name: 'note', index: 'note', width: 70, sortable: false}
],
rowNum: 10,
rowList: [5, 10, 20],
...
});
jQuery("#表格id").jqGrid('setGroupHeaders', {
useColSpanStyle: false,
groupHeaders:[
{startColumnName: '开始的标题名称', numberOfColumns: 合并的表头数量, titleText: '<em>合并后的表头名称</em>'},
{startColumnName: '开始的标题名称', numberOfColumns: 合并的表头数量, titleText: '合并后的表头名称'}
]
});
jqgrid 合并表头的更多相关文章
- jqGrid合并表头
jqGrid是一款常用的制表软件,最近开发刚好用到.记录一下常用功能留着以后查找顺便发扬一下开源精神. 二级表头是一种经常会碰到的需求,很多时候为了方便查找需要在原有的表头上再加一层,区分表格不同列的 ...
- asp.net GridView多行表头的实现,合并表头
protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == Da ...
- jqGrid合并单元格
两个参数 /**合并单元格:合并指定 gridName表格的NoName 列,合并的标准是参考CellName+CellNameTwo列内单元格的值. * gridName :表格名称 * NoNam ...
- jqGrid实现表头自动换行
当jqGrid表头内容过多无法全部展示时,添加以下css实现表头自动换行. <style type="text/css"> /* jqgrid 表头自动换行 */ th ...
- GridView合并表头多重表头
后台代码: using System; using System.Data; using System.Configuration; using System.Web; using System.We ...
- NPOI导出Excel合并表头写入公式
protected void Btn1_Click(object sender, EventArgs e) { //建立空白工作簿 IWorkbook workbook = new HSSFWorkb ...
- GridView合并表头、多重表头(转)
protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e) { switch (e.Row.RowType) ...
- handsontable合并表头
想在页面中做类似excel的操作,发现handsontable符合要求. 然后发现这个文章 http://blog.csdn.net/wynan830/article/details/9054195 ...
- DataGrid Column Group (合并表头)
<thead> <tr> <th colspan=">swjg</th> <th colspan=">swbm</ ...
随机推荐
- Django 删除 migrations
如果想重新创建表格,可以按如下步骤进行操作: 1. 从数据库中删除表格 DROP TABLE `table_name`; 2. 删除 migrations 文件 文件在APP名称下的 migratio ...
- 基于SSH开发银行个人业务管理系统 附源码
开发环境: Windows操作系统开发工具: MyEclipse+Jdk+Tomcat+MySql数据库 运行效果图
- PHP中数字转为百分位,千分位,万分位。。。
今天做项目中,需要将文章点击量显示在页面中,需求中给的是多少多少万,虽然不是什么难事,但做程序员这么久了,需要考虑的不再是简单的实现,而且有效率和快捷, 虽然PHP自带的函数有number_forma ...
- 前x个数据中至少有m个元素最小值与最大值之差不超过K
题意 给一组数据,从左到右开始,寻找最小的x,使得第1个元素到第x个元素中,至少存在m个数据,最小值与最大值之差不超过K. INPUT 第一行是T,代表数据组数 每组数据的第一行是三个整数,n.m.k ...
- WLC-生成CSR操作
1.生成CSR [req]req_extensions = v3_req[ v3_req ]# Extensions to add to a certificate requestbasicConst ...
- 加载Properties配置文件
/** * 加载Properties配置文件 * * @author ZhangHaiNing * @param file 要读取的文件 * @return */ public static Prop ...
- Codeforces Round #600 (Div. 2) - D. Harmonious Graph(并查集)
题意:对于一张图,如果$a$与$b$连通,则对于任意的$c(a<c<b)$都有$a$与$c$连通,则称该图为和谐图,现在给你一张图,问你最少添加多少条边使图变为和谐图. 思路:将一个连通块 ...
- 洛谷P1009 阶乘之和 题解
想看原题请点击这里:传送门 看一下原题: 题目描述 用高精度计算出S=!+!+!+…+n! (n≤) 其中“!”表示阶乘,例如:!=****××××. 输入格式 一个正整数N. 输出格式 一个正整数S ...
- 包装类和toString和static关键字
包装类 针对八种基本数据类型定义的引用类型. 有类的特点,可以调用类中的方法. 基本数据类型 包装类 boolean Boolean byte Byte short Short int Integer ...
- 教育片- Economics by Crash Course(共35集)(未完结)
第一集Intro to Economics: Crash Course Econ #1 传送门:https://www.youtube.com/watch?v=3ez10ADR_gM&list ...