Export in Excel or CSV after updating Datatables

Export in Excel or CSV after updating Datatables

olivier68olivier68 Posts: 1Questions: 1Answers: 0

Hi.
I've a web application which use Datatables and the user can modify some row by doubleclicking on it (It display an input instead of the value, and after pressing enter in the input, the value is updated by the value of the input). But, when I use the export button of Datatables, old value persist and I can't get the new value. How can I do this ?

Answers

  • allanallan Posts: 62,994Questions: 1Answers: 10,368 Site admin

    Sounds like you are updating the HTML directly rather than using the DataTables API to update the table. You should use cell().data() to update the content of a cell rather than writing it to the DOM directly (since DataTables' caches the values for speed).

    Allan

This discussion has been closed.