How to set data inside DataTables from AJAX call outside of DataTables.
How to set data inside DataTables from AJAX call outside of DataTables.
mesqueeb
Posts: 38Questions: 12Answers: 1
So I read the answer here:
https://datatables.net/forums/discussion/25309/reuse-ajax-source-for-multiple-tables-on-the-same-page
and I need to "set it with the data option."
Is there any example on how to do that?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Dear Allan,
I tried using the
rows.add()
function, but this doesn't work well with thecolumns.data
option. So what method do you advice?Do you have any example how you get ajax JSON data outside of DataTables and load it into the datatable?
I figured it out. How can I delete this post?
Mesqueeb, Allan has replied my inquiry regarding similar issue. He told he is going to write a blog regarding to populate the datatable from external source on click event and ultimately save to the corresponding table.