javascript - DHTMLX "onEditCell" event called after "onClick" button event -
i have dhtmlxgridobject
named mgrid
.
i have attached validation event:
mgrid.attachevent("oneditcell", function(stage, rid, cind, nvalue, ovalue){...});
also have save button:
<input type="button" value="save" onclick="onsaveclick();" />
all works fine except 1 situation: if edit data , leaving cursor in cell , click "save" method "onsaveclick" called first , "oneditcell" called.
how can perform calling "oneditcell" before "onsaveclick"?
this should trick:
try closing cell-editor first in onsaveclick()
function. trigger oneditcell
event.
function onsaveclick(){ mgrid.editstop(); //your code... }
Comments
Post a Comment