DataTables Editor > getting back the EDITED data after inline editing the row's data
DataTables Editor > getting back the EDITED data after inline editing the row's data
trendsic
Posts: 7Questions: 2Answers: 1
I'm having trouble getting back the EDITED inline edited row data. Using table.row(this).data()
inside a editor.on('edit')
callback I can get back the previous row data, but I need it for the row data that was just edited.
note: "table" and "editor" are using the API method set to the table and editor jQuery selectors
This discussion has been closed.
Answers
You can use postSubmit
https://editor.datatables.net/reference/event/postSubmit
but that will also be triggered if the editing was unsuccessful
or you use submitSuccess
https://editor.datatables.net/reference/event/submitSuccess
which gives you the benefit that you don't have to deal with unsuccessful submissions.
@rf1234 that's a better callback than 'edit', so thanks for that, but I still don't see a way for me to get the row data out after it's been edited.
Here's my current code:
I've been unsuccessful finding an object with the edited data. Something like
e.currentTarget.data
or similar is what I was expecting, but everything I can find is dead ends.I figured it out.