Manually call 'fnDrawCallback' on a row
Manually call 'fnDrawCallback' on a row
luca.landa
Posts: 3Questions: 2Answers: 0
Hi, I'm having a problem updating rows data:
When do it with table.cell(index1, index2).data(newData)
, it does not call fnDrawCallback
, and I haven't found a way to manually call it on the row.
Is it possible to do it, without removing and adding back the row?
This discussion has been closed.
Answers
Hi Luca,
I believe if you simply add
.draw()
to the end of that line, it should work.So it should be
table.cell(index1, index2).data(newData).draw()
Hopefully that helps.
Dan.
Edit: Also, just so you're aware
fnDrawCallback
is the name of the function in the old, legacy version of DataTables. If you're using Datables 1.10 or above, the actual name of the function isdrawCallback
. Hope this helps.Edit:
Hi Dalder, I was using the wrong callback, 'drawCallback' works, thanks!