.row().data().invalidate().draw() causes table to reload
.row().data().invalidate().draw() causes table to reload
moden
Posts: 11Questions: 4Answers: 0
I am trying to preform a single row update of a ajax enabled datatable. I update the row using the following code:
oTableErrors.row(itemrow).data(item).invalidate().draw();
where item contains the updated object from the server.
The table reloads instead of just drawing the one line.
What am I doing incorrectly?
This discussion has been closed.
Answers
Are you using server side processing?
If so the
draw()
will request the current page data each time its executed.Kevin
OK, so is there a way to update a row in data table that is using server side processing without refreshing the whole table?
No. Server-side processing fundamentally means that every draw of the table will make an Ajax request to the server to get the data for the page. If you want to refresh the data shown, it needs to make an Ajax request to get the 10 rows (or whatever) again.
Allan