Hey i have a datatable running with a fixedheader and a fixedfooter.
When i removed the whole table with DataTable().destroy(true); everything is removed except the fixed footer that was displaying at that moment.
Any solution for this?
This question has an accepted answers - jump to answer
It appears to work okay here. Can you link to a test case showing the issue please?
Seems to work here:
Can you post a link to your page or a test case showing the issue?
i can not post a link the problem.
what we do:
1- load a div with ajax, this div contains a dom sourced table
2- we destroy all instances of datatables
3- we start datatables on this new table, and add a fixed header/footer
4- via ajax we load a new table in the same div (with a new id)
5- we destroy all instances of datatables
6- we start datatables on this new table, and add a fixed header/footer
at this moment the footer that was displayed from the first table is still visible ...
the code used fot step2/3 and 5/6) can be viewed at
Can you build a test case showing the issue?
You can find a base example using AJAX here:
here is one
Thanks! Here is an updated example:
I changed the order of operations in the click event. Datatables destroys the table before clearing and moving the second table's HTML to the first.
Also I added the .tbl class to the second table.
destroying them before we remove them from fixes the problem.
It looks like you're new here. If you want to get involved, click one of these buttons!
DataTables designed and created by SpryMedia Ltd.
SpryMedia Ltd is registered in Scotland, company no. SC456502.