Multiple tables and FixedColumns (or any plugin, from what the forums show) does not work
Multiple tables and FixedColumns (or any plugin, from what the forums show) does not work
I am trying to get FixedColumns to work with multiple tables. Here is a complete working example, as simple as I can possibly make it. As you can see, the top table correctly locks the column, but the second table does not. The tables are created dynamically.
Any ideas? :(
[quote][code]
$(document).ready(function() {
var oTable = $('.multidatatable').dataTable( {
"sScrollX": "100%",
"sScrollXInner": "150%",
} );
new FixedColumns( oTable, {
"iLeftColumns": 1
} );
} );
[/code][/quote]
Any ideas? :(
[quote][code]
$(document).ready(function() {
var oTable = $('.multidatatable').dataTable( {
"sScrollX": "100%",
"sScrollXInner": "150%",
} );
new FixedColumns( oTable, {
"iLeftColumns": 1
} );
} );
[/code][/quote]
This discussion has been closed.
Replies
[code]
$('.multidatatable').each( function () {
new FixedColumns( $(this).dataTable() );
} );
[/code]
Something I'll add to the list to see if it can be improved.
Thanks for the feedback,
Allan
Code:
[code]jQuery(document).ready(function() {
var oTable = jQuery('.datatable').dataTable({
"bFilter": false,
"bInfo": false,
"bPaginate": false,
"sScrollX": "100%",
"sScrollXInner": "110%",
"bScrollCollapse": true
});
new FixedColumns(oTable,{
"iLeftColumns": 1,
"iRightColumns": 1,
"sLeftWidth": "relative",
"iLeftWidth": 30,
"sRightWidth": "relative",
"iRightWidth": 20
});
});[/code]