When my server-side processing datatable is loaded the header is broken. To resolve this, I added table.columns.adjust().draw()
to my initComplete function:
var table = $('.table').DataTable({
"serverSide": true,
/// more code...
"initComplete": function(settings, json) {
table.columns.adjust().draw();
}
});
This works, but it affected the pagination. The correct page is not displayed anymore. It is set back to to first page. How can I prevent this?