Update table

Update table

ShevchukShevchuk Posts: 4Questions: 0Answers: 0
edited November 2011 in General
Hi. I'm trying to update table by updating its data source and then redrawing the table. No luck, though. Am I doing something wrong?
Example: http://live.datatables.net/upuxom/edit

Replies

  • ShevchukShevchuk Posts: 4Questions: 0Answers: 0
    Huh, fnClearTable + fnAddData fixed it, never mind. Working example: http://live.datatables.net/upuxom/2/edit
  • michaeladammichaeladam Posts: 7Questions: 0Answers: 0
    You may also want to try using fnUpdate: http://datatables.net/ref#fnUpdate. This will prevent you from completely emptying and rebuilding the table. (This will be intensive for large data sets)

    The reason why only editing gridData does not update the table because a copy of gridData gets passed into the init object for dataTables. Any edits to gridData will not reflect in the table.
This discussion has been closed.