Changing cell value with value in dom [Editor]

Changing cell value with value in dom [Editor]

BigDataWarehouseBigDataWarehouse Posts: 23Questions: 10Answers: 0

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

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
  • BigDataWarehouseBigDataWarehouse Posts: 23Questions: 10Answers: 0

    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?

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    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 or submitComplete (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

This discussion has been closed.