Issues with getting fixed header going
Issues with getting fixed header going
QuesnelJ
Posts: 25Questions: 4Answers: 0
Hello again,
I am trying to get fixedHeader working, and I'm not getting much luck. I was hoping someone could point me in the right direction. Here is my configuration code:
tableHndl = $('#allDataTableData').DataTable ( // Connect to our table in our view.
{
FixedHeader : true,
lengthMenu : [[10, 50, 100, 200, 300, 500], ["10", "50", "100", "200", "300", "500 (May be slow)"]],
pageLength : defaultPageLength,
processing : true,
serverSide : true,
order : defaultOrderBy,
ajax : {
url : '/dispatch.php/' + productName + '/getData',
type : "post",
error : function()
{
$(".allDataTableData-error").html ("");
$("#allDataTableData").append ('<tbody class="employee-grid-error"><tr><th colspan="3">Data not found.</th></tr></tbody>');
$("#allDataTableData_processing").css ("display","none");
}
}
}); // tableHndl = $('#allDataTableData').DataTable
Thanks for your assistance.
This discussion has been closed.
Answers
Ooops, I changed FixedHeader : true, to fixedHeader : true, and things are still not working.
Never mind, I figured it out. Apparently the following CSS is required: "https://cdn.datatables.net/fixedheader/3.1.2/css/fixedHeader.dataTables.min.css".
I did not see this in the documentation, but maybe I missed something.
I found it here: https://stackoverflow.com/questions/40361437/datatable-fixed-header-not-working