Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by tep on Mar 11, 2008 00:04
open dhtmlx forum
onEditCell

hi,

regarding onEditCell event..
in your documentation, it is stated that there are 3 stage..before start,opened, closed..something like that..
is there a way to know which stage it is in..
actually im planning to execute a function as it opens..
and also probably as it closes..using two different functions..

thank you in advance for the help..
Answer posted by Support on Mar 11, 2008 02:29
Editting stage is passed in "onEditCell" event handler as the first parameter:

grid.attachEvent("onEditCell",onEditFunc);

function onEditFunc(stage,row_id,cell_index,new_value,old_value){

    if(stage ==1){

       //your code here

    }
    return true;
}

P.S. new_value,old_value are available only in 2 stage.