1
我有一個具有分組的jqGrid。我的jqGrid代碼與Oleg提供的我的上一個問題here或working fiddle類似。在jqGrid中更改組中行的樣式/字體
$('#states').jqGrid({
datatype: 'local',
data: data.DOCS,
colNames: ['', 'Documents Received', 'Comments', 'NA', 'DocGroup'],
colModel: [
{ name: 'Documents', index: 'Documents', align: 'left', sortable: false, editable: false, width: 20 },
{ name: 'DocsReceived', index: 'DocsReceived', align: 'center', sortable: false, editable: true, edittype: 'checkbox', editoptions: { value: "True:False" }, formatter: "checkbox", width: 140 },
{ name: 'Comments', index: 'Comments', align: 'center', sortable: false, editable: true, edittype: "textarea", editoptions: { rows: "3", cols: "16" }, width: 180 },
{ name: 'NA', index: 'NA', editable: true, formatter: 'dynamicText', width: 150, edittype: 'custom', editoptions: { custom_element: radioelem, custom_value: radiovalue} },
{ name: 'DocGroup', index: 'DocGroup', editable: false, width: 1,
sorttype: function (cellvalue, rowObject) {
return cellvalue? cellvalue : rowObject.Documents;
}}
],
rowNum: data.DOCS.length,
//rowList: [10, 20, 30],
pager: '#statespagerdiv',
viewrecords: true,
sortorder: "asc",
sortname: 'Documents',
grouping: true,
groupingView: {
groupField: ['DocGroup'],
groupColumnShow: [false],
groupDataSorted: true,
groupOrder : 'asc'
},
localReader: {
id: 'ConfigId'
},
shrinkToFit: false,
height: 'auto',
loadComplete: function() {
hideGroupHeaders(this);
},
onSelectRow: function (id) {
$(this).jqGrid('saveRow', previouslyselectedRow, false, 'clientArray');
previouslyselectedRow = setJQGridRowEdit(id, previouslyselectedRow, $(this));
}//,
//width: 710
});
我怎麼能有未分組(或不在一組)和分組報頭具有相同風格的行,但排在一組應該有那些不在組或不同的風格分組標題。