Using sScrollY attribute throws TypeError: Cannot read property 'style' of undefined
Using sScrollY attribute throws TypeError: Cannot read property 'style' of undefined
Hi ;-),
as I described in the topic, I use the sScrollY attribute to add a scrollbar to my datatable. After the initial load everything looks fine but when I reload my content via Ajax call. I got this error message from the framework. I have checked the source and it came from following code which starts in line 5559 at jquery.dataTables.js:
/* Apply custom sizing to the cloned header */
var nThs = _fnGetUniqueThs( oSettings, nTheadClone );
iCorrector = 0;
for ( i=0 ; i<iColums ; i++ )
{
var oColumn = oSettings.aoColumns[i];
if ( oColumn.bVisible && oColumn.sWidthOrig !== null && oColumn.sWidthOrig !== "" )
{
nThs[i-iCorrector].style.width = _fnStringToCss( oColumn.sWidthOrig );
}
else if ( oColumn.bVisible )
{
-------> HERE nThs[i-iCorrector].style.width = ""; <-------
}
else
{
iCorrector++;
}
}
When I remove the attribute everything works. I have added the following attributes to the table configuration
"bPaginate": false,
"bDestroy": true,
I also use the function fnClearTable().
When I add "bAutoWidth" = false, the reload of the table works. But then I have another problem with the selection of rows.
Had anybody the same problem in the past and a solution??
Greets