I am using DataTables (jQuery plugin) to display my tabular data. If fetches data using AJAX from a JSON web service.
How do I force it to refresh using JavaScript/jQuery? I am looking through the API and cannot find the right function.
While waiting for the answers, I finally found it: fnDraw function is what I needed.
It's described at the beginning of the API section, but I just didn't bother to read it all:
You must make the required calls to the server to manipulate your data as required, and then simply redraw the table (
fnDraw) to view the new data.
Try calling:
$("#Table1").fnDestroy().dataTable();
That should rebuild it...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With