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</ ...
随机推荐
- ASP.NET Core搭建多层网站架构【8.2-使用AutoMapper映射实体对象】
2020/01/29, ASP.NET Core 3.1, VS2019, AutoMapper.Extensions.Microsoft.DependencyInjection 7.0.0 摘要:基 ...
- Linux - 查看所有服务状态
ubuntu: service --status-all 例如可查看ssh, apache2等服务是否开启
- [LeetCode] 735. Asteroid Collision
行星碰撞. 题意是给一个数组 asteroids,表示在同一行的行星.对于数组中的每一个元素,其绝对值表示行星的大小,正负表示行星的移动方向(正表示向右移动,负表示向左移动).每一颗行星以相同的速度移 ...
- Java IO流详解(一)——简单介绍
文件在程序中是以流的形式来传输的.所以用Java来传输文件就得使用到Java IO流. 1.流的概念和作用 流:代表任何有能力产出数据的数据源对象或者是有能力接受数据的接收端对象<Thinkin ...
- 电源适配器DC插头规格
电源适配器 DC 插头的内径外径规格有 (单位为 MM) :2.0*0.72.35*0.72.35*1.12.5*0.73.5*1.13.5*1.354.0*1.75.5*2.15.5*2.54.75 ...
- js 子窗口调用父框框方法
父窗口 子窗口
- lable 语句
var is = 20; loop: while(is > 10){ console.log(is); if(is % 7 == 0){ break loop; } is --; } 结果: b ...
- 【JAVA算法题】职业抢劫
题目 /*You are a professional robber planning to rob houses along a street. * Each house has a certain ...
- 单元测试及框架简介 --junit、jmock、mockito、powermock的简单使用
转 单元测试及框架简介 --junit.jmock.mockito.powermock的简单使用 2013年08月28日 14:33:06 luvinahlc 阅读数:6413 标签: 测试工具单元测 ...
- UDP通讯代码
UDP客户端代码: import socket # 创建套接字 socket.AF_INET:IPV4 socket.SOCK_DGRAM:UDP协议 udp_client=socket.socket ...