auto refresh data table
auto refresh data table

Hi,
I'm looking to use datatable getting data from json url, using this doc. https://www.datatables.net/manual/ajax
But I need update the table without refresh website, then whats better way to do this?
I'm looking to use setinterval, it's the correct way?
Thanks,
This discussion has been closed.
Replies
You can use
ajax.reload()
to refresh with all the data using setinterval. Otherwise you will need to use the jQuery ajax() API to fetch just the new data and use eitherrow.add()
orrows.add()
to add the new data to the Datatable.Kevin
I will try. Thanks kthorngren!
Thanks for this - so simple, but boy has it made a difference to our use case.