Changing cell value with value in dom [Editor]
Changing cell value with value in dom [Editor]

I'm using editor in cell editing.
I would like when I press UPDATE, to append a calculated to another cell [4] In the same row
this is a sample:
I have a select option loaded in the modal on open and I get its value in the iput in the modal
editor.on('open', function () {
$('#add').change(function() {
$("#uid").val("");
var selected= $("#uid").val();
$("#uid").val(selected);
});
});
I use to use the selected value and append it to cell number 4 .. in the same row
thanks!!
Answers
You might try postEdit.
https://editor.datatables.net/reference/event/postEdit
thanks for your answer..
I working on:
table.cell({row:2, column:12}).data(selected);
column:12 is a default
row:2 <--- I need to find the clicked cell's row
my final result could look like:
table.cell({row:rowVal, column:12}).data(selected);
what do you think?
No, that would change the data in the table, but it wouldn't update it on the server so it wouldn't persist the next table draw. As @tangerine said, you would make the change in an event, such as
postEdit
orsubmitComplete
(I'd recommend putting it there).You would then use
edit()
- the third example on that page would be what you want to do.Colin