How to destroy a datatable & make way for new datatable?
How to destroy a datatable & make way for new datatable?
lebowski
Posts: 2Questions: 0Answers: 0
Hi,
I'm using bootstrap-daterangepicker to select a range for which data will be shown in Datatables.
It is working fine.
Problem is when I select a new range in daterangepicker, it provides me with a callback function where I can do my stuff.
In that callback function, I'm calling Datatables again. But since the table is already being created, how can I destroy the previous table and show a new one in it's place?
Kindly help. I'm stuck. :(
I'm using bootstrap-daterangepicker to select a range for which data will be shown in Datatables.
It is working fine.
Problem is when I select a new range in daterangepicker, it provides me with a callback function where I can do my stuff.
In that callback function, I'm calling Datatables again. But since the table is already being created, how can I destroy the previous table and show a new one in it's place?
Kindly help. I'm stuck. :(
This discussion has been closed.
Replies
Call fnDestroy :-). If you want to remove the table from the DOM use `fnDestroy( true );` .
Allan