How to update/set a value in cell which is set as a editor in a datatable dynamically?

hi,
i have a text area , datatable and a button. After entering some text in the textarea if i click on the button the text entered in the textarea should b set to a cell row wise in the datatable. It is happening on first click , but if i delete in one cell and again click on the button the value is not setting, if i click again(second click after deleting the value in the cell) it is working fine.

In short, you need to applyeditStop oreditCancel (to avoid the data update) to a grid before executing other code in button’s onClick.

Why: click on a button (and the corresponding function) is applied before the editing is stopped due to the focus shift.

Thus, the sequence of applied values is the following:

  • value from textarea via onClick
  • value from the editor on its closing

Both mentioned methods will prevent such behavior.