Using FixedColumns on Multiple Tables within a Page
Using FixedColumns on Multiple Tables within a Page
I have several tables (10+) on my page that I would like to format with FixedColumns but can't seem to target them with a class. Only individual id's seem to work like so...
[code]
$.extend($.fn.dataTable.defaults, {
"sScrollX": "50%",
"sScrollXInner": "200%",
"bScrollCollapse": false,
"bPaginate": false,
"bSort": false,
"bInfo": false,
"bFilter": false,
"bAutoWidth": false
});
var oTable1 = $('#fixedColumnTest1').dataTable();
new FixedColumns( oTable1, {
"iLeftColumns": 2
,"iLeftWidth": 250
});
var oTable2 = $('#fixedColumnTest2').dataTable();
new FixedColumns( oTable2, {
"iLeftColumns": 2
,"iLeftWidth": 250
});
[/code]
Can anyone suggest a more efficient method?
Regards,
Richard
[code]
$.extend($.fn.dataTable.defaults, {
"sScrollX": "50%",
"sScrollXInner": "200%",
"bScrollCollapse": false,
"bPaginate": false,
"bSort": false,
"bInfo": false,
"bFilter": false,
"bAutoWidth": false
});
var oTable1 = $('#fixedColumnTest1').dataTable();
new FixedColumns( oTable1, {
"iLeftColumns": 2
,"iLeftWidth": 250
});
var oTable2 = $('#fixedColumnTest2').dataTable();
new FixedColumns( oTable2, {
"iLeftColumns": 2
,"iLeftWidth": 250
});
[/code]
Can anyone suggest a more efficient method?
Regards,
Richard
This discussion has been closed.