Call “onEditCell” event before “onClick” button event


#1

Hi,

I have dhtmlXGridObject named mGrid.

I have attached validation event:

mGrid.attachEvent("onEditCell", function(stage, rId, cInd, nValue, oValue){...});

Also I have save button:

<input type="button" value="Save" onClick="onSaveClick();" />
All works fine except one situation: If I edit the data and leaving the cursor in the cell and click “Save” then the method “onSaveClick” is called first and only then “onEditCell” is called.

How can I perform calling “onEditCell” before “onSaveClick”?

Thanks


#2

You can call

mygrid.editStop();

from onSaveClick handler
docs.dhtmlx.com/doku.php?id=dhtm … t_editstop


#3

Thank you, Stanislav. All works as expected