Static Table then Load from Server

Static Table then Load from Server

WolffyWolffy Posts: 3Questions: 0Answers: 0
edited February 2013 in DataTables 1.9
Wondering if this is possible. When my page initially loads, I have a static table on which I apply dataTable. Subsequent to that, user interaction my update, add or delete data to this table -- so I would like to reload the data in this table via Ajax. Just wondering if there is any way to 'convert' a table from DOM loading to Ajax Loading on the fly.

Or perhaps, since only one row in the table will be updated,/deleted/added at a time -- should I using the API then to update the table based on the success of the Ajax call?

(DT 1.9.4)

Replies

  • WolffyWolffy Posts: 3Questions: 0Answers: 0
    edited February 2013
    Well heck, sometimes just posting the question gives that moment of clarity needed. Rather than reload the whole table from the server, I'm going with the fnUpdate/fnDelete/fnAddData route -- seems to make more sense now.
  • allanallan Posts: 63,389Questions: 1Answers: 10,449 Site admin
    Deferred loading might be an option for you: http://datatables.net/release-datatables/examples/server_side/defer_loading.html

    Allan
  • WolffyWolffy Posts: 3Questions: 0Answers: 0
    Thanks Allan, that was the piece I was looking for. Tho for now, I'm, finding the API route doing exactly what I need it to do.
This discussion has been closed.