Manually call 'fnDrawCallback' on a row

Manually call 'fnDrawCallback' on a row

luca.landaluca.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?

Answers

  • DalderDalder Posts: 30Questions: 12Answers: 1
    edited August 2017

    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 is drawCallback. Hope this helps.

  • luca.landaluca.landa Posts: 3Questions: 2Answers: 0
    edited August 2017

    Edit:
    Hi Dalder, I was using the wrong callback, 'drawCallback' works, thanks!

This discussion has been closed.