onEditCell - current cell value not updated


I am using below function to get the changed value in the cell and its rowId and cIndex

mygrid.attachEvent(“onEditCell”, function (stage, rId, cInd, nValue, oValue)

and i am doing like
if(stage == 2){
mygrid.cells(rId, cInd).cell.innerText = nValue;

so that when i leave the event the value of my current cell is set to the updated value, but its not happening. After leaving function value is again reset to old value.

Is there something i am missing?

You need to update your code in such way:

mygrid.attachEvent("onEditCell", function (stage, rId, cInd, nValue){ if(stage == 2){ mygrid.cells(rId, cInd).setValue(nValue); return true;} return true });
But we must notify that this code has no sense. Without it you’ll achieve the same result

Thanks, problem solved