我正在使用ASP.NET MVC进行开发,我尝试使用jqgrid Guriddo_jqGrid_JS_5.2.1对多个列进行分组, 即使我只设置了一个分组字段,也会重复分组列,我尝试在jGrid中排序检查错误问题,但是除非我设置数据类型为local并设置属性GroupColumnby,否则该组不能正常工作,
$("#securitiesTable").jqGrid({
url: urlCurrentPage,
datatype: 'json',
type: 'get',
height: 'auto',
defaults: {
recordtext: "View {0} - {1} of {2}",
emptyrecords: "No records to view",
loadtext: "Loading...",
pgtext: "Page {0} of {1}",
pager: $("#securitiesPager"),
},
grouping: true,
groupingView: {
//groupField: ['MarketName', 'SecurityName', 'SecurityType'],
groupField: ['MarketName'],
groupColumnShow: [false] //,
// groupDataSorted: true
},
colNames: ['Id', 'Market Name', 'Security Name', 'Sector Symbol', //'Security Symbol',
'Security Type', 'Disabled', 'Suspended', 'Details', 'Edit', 'Delete'],
colModel: [
{ name: 'Id', index: 'Id', hidden: true },
{ name: 'MarketName', index: 'MarketName', sorttype: 'string', width: 200 },
{ name: 'SecurityName', index: 'SecurityName', sorttype: 'string', width:100},
{ name: 'SectorSymbol', index: 'SectorSymbol', sorttype: 'string', width: 200 },
//{ name: 'SecuritySymbol', index: 'SecuritySymbol', sorttype: 'string', width: 200 },
{ name: 'SecurityType', index: 'SecurityType', sorttype: 'int', width: 200, formatter: typeFormatter},
{ name: 'IsDisabled', index: 'IsDisabled', sorttype: 'int', width: 200, formatter: enableDisableFormatter },
{ name: 'IsSuspended', index: 'IsSuspended', width: 200, formatter: suspendedFormatter},
{ name: 'Details', index: 'Details', width: 130, formatter: detailsFormatter },
{ name: 'Edit', index: 'Edit', width: 130, formatter: editFormatter },
{ name: 'Delete', index: 'Delete', width: 130, formatter: deleteFormatter }
],
pager: $("#securitiesPager"),
rowNum: 10000,
viewrecords: true,
width: $(window).width() - 100,
rowList: [10, 25,50],
});
以上是JQgrid的部分