jqGrid设置三级表头和表头合并

		$(function(){
			$.topuiRender();

			$("#GridId").setGroupHeaders({ 
				useColSpanStyle: true,    //表头是否合并行
				groupHeaders:[ 
					{startColumnName: 'ColumnName1', numberOfColumns: 1, titleText: '二级表头1 '},
					{startColumnName: 'ColumnName2', numberOfColumns: 1, titleText: '二级表头2'},
					{startColumnName: 'ColumnName3', numberOfColumns: 1, titleText: '二级表头3'},
					{startColumnName: 'ColumnName4', numberOfColumns: 2, titleText: '二级表头4'}
				] 
			});
		    jQuery("#jydldlhsGrid").jqGrid("setComplexGroupHeaders",{
		        complexGroupHeaders:[
		            {startColumnName: 'ColumnName5', numberOfColumns: 21, titleText: ' 三级表头1'},
					{startColumnName: 'ColumnName6', numberOfColumns: 5, titleText: '三级表头2'},
					{startColumnName: 'ColumnName7', numberOfColumns: 11, titleText: ' '},//不设值需要给个空字符串
		        ] 
		  });    
		});

你可能感兴趣的:(HTML5前端)