Reload Datatable
Reload Datatable

How to reload data in datatable without reloading the page. I need to change the data in data table once the user click the button and I don't want to refresh the page. Is that possible?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
There are a few ways depending on what you have and how you need to reload the Datatable:
ajax.reload()
.destroy()
and reinitialize Datatables with the new data set.clear()
followed byrows.add()
to clear the table and add new rows.If this doesn't help then please provide more details of your environment, specifically how you are loading the data now.
Kevin
On click of action button a modal popup will be opened and after closing the modal popup I need to reload the data in datatable without refreshing the page. I have tried fndraw(),ajax.reload() . Its not working. Is there any other method?
How are you loading the initial data now? Is it Ajax loaded, DOM sourced?
We need to understand more about your environment. Please post a link to your page or a test case replicating the issue so we can have the information to offer suggestions.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin