Getting row data after edit

Getting row data after edit

csyucsyu Posts: 12Questions: 1Answers: 1
edited July 2022 in Editor


Description of the problem
I'm able to edit my table without issue. However, after I edit a cell, I am looking get other cell data from the row where the edit was made. To do so, I wrote the following code without success.

Here is my code:

editor.on('edit', function(e, json, data, id) {
console.log("Row id: " + id);
var row = table.row(id).data();
var versionNo = $.fn.dataTable.version;
console.log("Datatable version: " + versionNo);

Debugger console
Row id: id_1962
Datatable version: 1.12.1

Any help would be much appreciated.



  • kthorngrenkthorngren Posts: 19,496Questions: 26Answers: 4,619

    I think you will want to use the row-selector as shown in this String - #ID selector example. For example:

    table.row( "#" + id ).data();


  • csyucsyu Posts: 12Questions: 1Answers: 1

    Thank you very much Kevin. That worked.

Sign In or Register to comment.