Table header and body misalignement

Table header and body misalignement

kurukuru Posts: 3Questions: 2Answers: 0

Hi,
First time I populate data in datatable header and bosy is properly aligned. On click of button I reload data to the table. The table header and body is not aligned. Only first time it comes properly.

Table initialisation

if ( $.fn.dataTable.isDataTable('#tblData') ) {
$('#tblData').DataTable().clear();
//$('#tblData').DataTable().draw();
$('#tblData').DataTable().rows.add(tableData).draw();
} else {
$('#tblData').DataTable({
retrieve : true,
"columnDefs" : [ {
className : "dt-body-center"
} ],
"processing" : true,
"scrollX" : true,
"scrollY" : true,
"data" : tableData,

}

What can be the possible issue and how to solve it. Please help.

Answers

This discussion has been closed.