How to update existing row
How to update existing row
Jithu123
Posts: 8Questions: 6Answers: 0
Hi,
Can anyone tell how to update row based on some id?I am trying to use this cTable.rows(someId).data( newData ).draw();
But it is not working.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
If you are only wanting to update a single row it is better to use
row().data()
overrows().data()
.someId
would have to matchrow-selector
, if you are using the row index selector then someId would have to be an integer.For setting the data
newData
has to either be an array or object, you need to make sure it matches the type of data you've used for the table. If this doesn't match then it wont work.An alternative to
row().data()
is to userow().invalidate()
.Quick example
Thanks
Tom