I am using jQuery datatable plugin. I am rendering my html table first and then applying the plugin. It has some issues.
Issues:
Header column and body columns are not aligned.
If there are a lot of columns (columns are generated dynamically not possible to set a fix width of columns) the data table grows horizontally.
Sample Code :
var scrollY = $(window).height() * 80 / 100;
var oTable = $('#myTable').dataTable({
"sScrollX": "100%",
"sScrollY": scrollY,
"bScrollCollapse": true,
"bPaginate": false,
"bStateSave": false,
"bFilter": false,
"bInfo": false,
"bAutoWidth": false,
"bSort": true,
"aaSorting": []
});
oTable.fnAdjustColumnSizing();
This is how my table is looking
As you can see header and body are not aligned, table is expanding to the right of screen.
Any help is appreciated.
EDIT I am using this plugin inside JQuery tabs.
<head></head>
and<body></body>
tags in your table? can you share the html code also. – Bhushan Kawadkar