Updating row data without redrawing table
Updating row data without redrawing table
Link to test case: http://live.datatables.net/weqorujo/1/
Description of problem: In the example above, the user can update specific settings in the DataTable which makes an Ajax request back to the DB, saves the data and then updates the row to show the new value.
When I update the row with the new value, I issue:
table
.row( tr )
.data( row )
.draw();
The Problem: If I edit a value on Page 3, when I issue the .draw()
the DataTable kicks me back to page 1. Is it possible to maintain the page state?
This question has an accepted answers - jump to answer
Answers
If you check the
draw()
docs you'll see you can passfalse
to stop it from resetting the paging:Should do what you need.
Allan