Refresh datatable content after modifying a cell with jQuery

Refresh datatable content after modifying a cell with jQuery

imacimac Posts: 19Questions: 0Answers: 0
edited February 2013 in General
When I modify a cell with jQuery, lets say, with something like this:

[code]$(this).html('Error!');[/code]

Then the datatable seems not to be updated as the filtering function doesn't work well for that row with that modified cell.
(I hope i dont need to post a test case for such a simple thing :) )

Is there away to make datatables aware of this change in order to be able to still using the filtering?
Thanks.

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    > (I hope i dont need to post a test case for such a simple thing :) )

    No :-). In the FAQs this applies: http://datatables.net/faqs#append .

    DataTables 1.10 will include an `invalidate` method which will make DataTable re-read the source row, but at the moment you must use the API ( fnUpdate in this case).

    Allan
  • imacimac Posts: 19Questions: 0Answers: 0
    Thanks Allan. It works fine :)
This discussion has been closed.