How to modify the data object that is sent to the server on edit.
How to modify the data object that is sent to the server on edit.
IsaacBen
Posts: 35Questions: 8Answers: 4
Currently the format is
data.idSrcValue.columnName
This is a bit not friendly for my backend. I would like it to just be
columnName: value
I'm doing this dirty hack for now. Would like to know if there is a better way.
data: function ( d ) {
var id = Object.keys(d.data)[0];
var columnName = Object.keys(d.data[id])[0];
d[columnName] = d.data[id][columnName];
return d;
},
I have no idea how to get the column name and idSrc of the edited row so had to pull them out with Object.keys.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi,
There is a discussion about this here which you might find interesting.
Allan