How do I update the data of one row without drawing?
How do I update the data of one row without drawing?

var table =$('#profile-table').DataTable();
table.row( row ).data( data ).draw();
When i update one row using "table.row( row ).data( data ).draw();" the data is updated and again the table is drawn with previous values
This discussion has been closed.
Answers
Sounds like you have server side processing enabled. With server side processing each
draw()
API call will send an ajax request to the server to fetch the current page's data.You could remove the
.draw()
, ietable.row( row ).data( data );
, and have the table show the changed information. However sorting, etc won't be updated unless you calldraw()
.In order to keep the updated row data with server side processing you will need to use an jQuery Ajax request to send the data to the server and the server script will need to update your Database.
Kevin
Thanks @kthorngren for the clarifying this.
But the solution which u provided is partial for my case.
The other problem is i am using "createdCell" to render the columns. But when i update the row using "table.row( row ).data( data )", it is actually taking the data of that attr, but not printing the data as i had in. createdCell.
How to render the desired value using createdCell and table.row( row ).data( data )
The
columns.createdCell
docs state this:Basically it runs only once. For data that changes use
rowCallback
.Kevin