When using the sScrollX
, sScrollXInner
and/or sScrollY
to achieve a fixed header table with its inner content scroll
If you want to use scrollY use:
$('.DataTables_sort_wrapper').trigger("click");
Trigger DataTable search function after initializing DataTable with a blank string in it. It will automatically adjust misalignment of thead
with tbody
.
$( document ).ready(function()
{
$('#monitor_data_voyage').DataTable( {
scrollY:150,
bSort:false,
bPaginate:false,
sScrollX: "100%",
scrollX: true,
} );
setTimeout( function(){
$('#monitor_data_voyage').DataTable().search( '' ).draw();
}, 10 );
});
I have fixed the column issue bu using below concept
$(".panel-title a").click(function(){
setTimeout( function(){
$('#tblSValidationFilerGrid').DataTable().search( '' ).draw();
}, 10 );
})