Strange issue with IE8 with 1.9.4

Strange issue with IE8 with 1.9.4

BigBadJockBigBadJock Posts: 2Questions: 0Answers: 0
edited April 2013 in DataTables 1.9
I'm having a strange issue with IE8 - our corporate standard (at least it's not IE6) - in _

fnCalculateColumnWidths ( oSettings ) line 3565 -
[code]
var iColums = oSettings.aoColumns.length;
[/code]
In IE9, IE10, Firefox and Chrome for my table it returns 8, in IE8 it returns 9, and then proceeds to throw up errors around line 3654
[code]
nThs[i - iCorrector].style.width = "";
[/code]
with property is undefined.

Only happening in IE8 in IE8 standards mode. There don't seem to be any obvious differences. I'm using twitter bootstrap.
[code]
var asInitVals = new Array();
$(document).ready(function () {

var oTable = $('#main').dataTable(
{
"bPaginate": true,
"bLengthChange": true,
"bFilter": true,
"bSort": true,
"bInfo": true,
"bProcessing": true,
"bServerSide": true,
"bStateSave": true,
"sAjaxSource": "/UserProfile/GetUserProfiles",
"aaSorting": [[2, 'asc'], [1, 'asc']],
"aoColumns": [null, null, null, null, null, null, null,
{
"sName": "x",
"fnRender": function (oObj) {
return "" +
"Edit";
}
}, ],
"sDom": "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>",
"sPaginationType": "bootstrap",
"oLanguage": { "sLengthMenu": "_MENU_ records per page" },
"sScrollY": "400px",
});
});
[/code]

Replies

  • BigBadJockBigBadJock Posts: 2Questions: 0Answers: 0
    This seems to be only an issue with tables using server side data.
  • tawmantawman Posts: 3Questions: 0Answers: 0
    I am running into the same issue on a server side paged table in IE8 compatibility mode... did you find a resolution to this problem?

    Thanks.
  • tawmantawman Posts: 3Questions: 0Answers: 0
    Looks like the DT_RowId column in IE8 mode shows up in oSettings.aoColumns but not when in IE9 normal. This causes the iColums count to be +1 the actual number of header rows.
  • tawmantawman Posts: 3Questions: 0Answers: 0
    I found the problem and it is the same with your setup on line 23 as you have a trailing comma after your last aoColumns. The trailing comma is triggering DataTables to add the DT_RowId in my case to the aoColumns.

    Once I removed the trailing comma after the last mData, in my case, the problem went away. I knew it was a configuration error as my other grids with a similar setup were working in IE8 mode.
  • chankeypathakchankeypathak Posts: 3Questions: 0Answers: 0
    Thanks a lot tawman, I also came across the same issue in IE8. I left one extra comma at the end.
This discussion has been closed.