Is it possible to toggle between datasets in one table with the same columns?
Is it possible to toggle between datasets in one table with the same columns?

Is there any way to do this?
Essentially, I would like there to be a button next to the header allowing an end-user to toggle different datasets. These datasets have the same columns so I believe this to be doable. Haven't been able to find a viable solution.
This discussion has been closed.
Answers
One option is to use tabs like this example:
https://datatables.net/examples/api/tabs_and_scrolling.html
Another option is to use
ajax.url().load()
to reload the table with a different URL.A third is to use jQuery Ajax to fetch the data and use
clear()
followed byrows.add()
.There are probably others. Really depends on how you want to solve the problem.
Kevin
Hi, Kevin -
Thank you for your reply.
I am going to give the first option a shot as it looks to be aimed at exactly what I need!