Fixed Column javascript error
Fixed Column javascript error
Hi All,
I'm trying to use the FixedColumns feature and have issues when using it with other features such as the ColVis extra or with sorting enabled. This is happening with DataTables 1.8.2, FixedColumns 2.0.1, jQuery 1.6.2. This line at 884
[code]
$('>tfoot th:eq('+iIndex+')', oClone.footer)[0].className =
this.s.dt.aoColumns[ aiColumns[iIndex] ].nTf.className;
[/code]
produces the error "'0' is null or not an object" each time a column is sorted or has the visibility checkbox changed.
I have a small table (6 rows/9 columns) which includes a footer with data.
I also noticed that the horizontal scroll bar is inserted between the body and footer. Is there a way to get the scroll bar to appear beneath the footer instead?
Thanks,
Jim
I'm trying to use the FixedColumns feature and have issues when using it with other features such as the ColVis extra or with sorting enabled. This is happening with DataTables 1.8.2, FixedColumns 2.0.1, jQuery 1.6.2. This line at 884
[code]
$('>tfoot th:eq('+iIndex+')', oClone.footer)[0].className =
this.s.dt.aoColumns[ aiColumns[iIndex] ].nTf.className;
[/code]
produces the error "'0' is null or not an object" each time a column is sorted or has the visibility checkbox changed.
I have a small table (6 rows/9 columns) which includes a footer with data.
I also noticed that the horizontal scroll bar is inserted between the body and footer. Is there a way to get the scroll bar to appear beneath the footer instead?
Thanks,
Jim
This discussion has been closed.
Replies
I also found that In FF when hiding a column causes the horizontal scroll bar to go away, the footer elements that are under the fixed columns are not moved up like the ones that are under the scrollable area.
Allan
Jim
[code]
<!DOCTYPE html>
C1
C2
C3
C4
C5
C6
C7
C8
C9
Totals:
0%
0%
0%
0%
0%
0%
0%
0%
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
var oTable;
$( function()
{
oTable = $( '#aTable' ).dataTable({
"sScrollX": "100%",
"bScrollCollapse": true,
"sDom": 'C<"clear">t',
"oColVis": { "aiExclude": [ 0, 1 ], "sAlign": "right" }
});
new FixedColumns( oTable, { "iLeftColumns": 2 } );
});
[/code]
It sounds like that little constraint in FixedColumns needs to be relaxed a bit.
Allan
Thanks again,
Jim
Good to hear the work around does the job for now though!
Regards,
Allan