Problem: DataTable Features Don't Work After Changing Data By Ajax
Problem: DataTable Features Don't Work After Changing Data By Ajax
Hi there :-)
I have a Datatables table, and I've added ajax update feature (I'm NOT using Datatables built-in ajax feature), that replaces the <tbody> section of my table with new rows, based on the criteria.
The problem is, after the filtration, I can see the new rows properly, but other features like column sorting and pagination are not functioning well. I re-invoked the .Datatables() on my table, but I received an error messaged that this has already been DataTable-ed.
Could you please tell me what is the solution? If I should include anything on top of "The core DataTables library" please let me know.
Thank you very much for your help,
Cheers,
Sia
Answers
I am facing the same problem but not found any solution.
Happy to help. Per the forum rules, please link to a test case that shows the issue, per the forum rules.
Likely the issue is that you are not using the DataTables API to add and remove rows - per this FAQ.
Allan