0
我一直試圖讓jqGrid的的多組功能的工作,但我只獲得了第一個層次分組:jqGrid的多組第二級沒有出現
應該有另一組。這裏的源代碼:
$('#grdData').jqGrid({
url: 'Default.aspx?method=GetGridData',
datatype: 'json',
colNames: ['Exchange', 'Market', 'Security Name', '', ''],
colModel: [
{ name: 'exchange', index: 'exchange', width: 100, align: 'center' },
{ name: 'market', index: 'market', width: 100, align: 'center' },
{ name: 'secname', index: 'secname', width: 200 },
{ name: 'remino', index: 'remino' },
{ name: 'clino', index: 'clino' }
],
rowNum: 5,
pager: '#pgrGrid',
sortname: 'exchange',
viewrecords: true,
sortorder: 'asc',
grouping: true,
groupingView: {
groupField: ['remino', 'clino'],
groupColumnShow: [false, false],
groupText: ['<b>{0}</b>', '{0}'],
groupCollapse: false,
groupOrder: ['asc', 'asc'],
groupDataSorted: true
}
});
clino組沒有出現,我檢查了響應json,我認爲沒關係。另外,當我將groupColumnShow設置爲'true','true'時 - 兩個分組列顯示在標題中。
你可以發佈你的服務器響應 - 爲什麼你有空白列名'',''? –
@Ryan_Rubin,你有答案嗎?我收到了同樣的錯誤。如果我嘗試通過任何一個字段進行分組,它都可以工作如果我嘗試按兩個字段進行分組,則只使用第一個分組。 –