How to set data inside DataTables from AJAX call outside of DataTables.

How to set data inside DataTables from AJAX call outside of DataTables.

mesqueebmesqueeb 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

Answers

  • mesqueebmesqueeb Posts: 38Questions: 12Answers: 1

    Dear Allan,

    I tried using the rows.add() function, but this doesn't work well with the columns.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?

  • mesqueebmesqueeb Posts: 38Questions: 12Answers: 1

    I figured it out. How can I delete this post?

  • bhandaribishnubhandaribishnu Posts: 9Questions: 4Answers: 1
    Answer ✓

    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.

This discussion has been closed.