Partial Redraw via AJAX call
Partial Redraw via AJAX call
I have a datatable which shows all records from a database table. It is loaded via an AJAX call. Works great.
After the dataTable is instantiated and populated, I then prepend a drop down selection box to the dataTables_length div to select from. Works great.
When I make a change to the selected option, I make an AJAX call to the backend, and get a different set of records back. Works great.
How do I redraw my existing dataTables WITHOUT loading the entire datatables object? Or, put more precisely, how can I reload only the rows with the new data?
There seems to be a lot of related info out there but nothing I've found works.
Thank you
Answers
If I understand correctly you can use
clear()
to clear the Datatable then userows.add()
along withdraw()
to update the Datatable with the new data.Kevin