views:

96

answers:

1

I've a jqGrid v3.7.2, after hiding a column using

.jqGrid('hideCol', infoName);

and setting the grid width using

.setGridWidth(setWidth, true)

The columns do not expand to fill the table width in IE8 only.

The table width is correct. The tbody/col widths comes short.

Any way to solve this problem via CSS? Or is there another mehod in jqGrid to correct this problem.

A: 

Found a solution from: http://stackoverflow.com/questions/2654103/ie8-isnt-resizing-tbody-or-thead-when-a-column-is-hidden-in-a-table-with-table-l

Simplified below for my purpose, added right after I hide the column:

// IE8 Fix, tbody not equal to table width for hidden col
            $('#tblGrid_Subject, td[aria-describedby=tblGrid_Subject]').attr('colSpan', '2');
Brandon