FixedColumns not factoring hidden columns into rendering
FixedColumns not factoring hidden columns into rendering
WeaponX86
Posts: 40Questions: 0Answers: 0
My declaration:
[code]
new FixedColumns(oTable,{
"iLeftColumns": 0,
"iRightColumns": 1
});
[/code]
In FixedColumns.js (full source) line ~403 it says:
[code]
if ( that.s.iTableColumns-that.s.iRightColumns <= i )
{
iRightWidth += iWidth;
}
[/code]
In my case,
that.s.iTableColumns = 19 but only 15 are actually visible so using this declaration creates an off screen fixed column.
that.s.iTableColumns = 19
that.s.iRightColumns = 1
"i" only goes up to 14 because there are only 15 actual columns, thusly iRightWidth never gets set.
[code]
new FixedColumns(oTable,{
"iLeftColumns": 0,
"iRightColumns": 1
});
[/code]
In FixedColumns.js (full source) line ~403 it says:
[code]
if ( that.s.iTableColumns-that.s.iRightColumns <= i )
{
iRightWidth += iWidth;
}
[/code]
In my case,
that.s.iTableColumns = 19 but only 15 are actually visible so using this declaration creates an off screen fixed column.
that.s.iTableColumns = 19
that.s.iRightColumns = 1
"i" only goes up to 14 because there are only 15 actual columns, thusly iRightWidth never gets set.
This discussion has been closed.
Replies
[code]
shownCols = $('tbody>tr:eq(0)>td', this.s.dt.nTable);
shownCols.each( function (i) {
iWidth = $(this).outerWidth();
that.s.aiWidths.push( iWidth );
if ( i < that.s.iLeftColumns )
{
iLeftWidth += iWidth;
}
if (shownCols.length-that.s.iRightColumns <= i )
{
iRightWidth += iWidth;
}
} );
[/code]
Regards,
Allan
oStyle.width = that.s.aiWidths[iColumn]+"px";
This is because later on in the script there are more loops that aren't taking the hidden columns into account.