问题描述:

I am using JQgrid SetGroupHeader function and it is working fine in ie9, but when running the same code in ie8, it is giving the error "Unable to get value of the property 'startColumnName': object is null or undefined". I tried to debug the code and in JQgrid.js I noticed that columnHeaders array length is 2 even though I have defined only one record in the groupHeaders array. Here is the group header definition:

$("#tblList").jqGrid('setGroupHeaders', {

useColSpanStyle: true,

groupHeaders: [

{

'startColumnName': 'Jan', numberOfColumns: 12, titleText: 'year 2014' },

]

});

网友答案:

I figured it out. It was due to a comma after the curly braces in the groupHeaders. For some reason IE9 did not give the error and IE8 assumed that there are two records in the groupheader array. Thanks

相关阅读:
Top