Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Allan Hansen on Feb 23, 2009 03:26
open dhtmlx forum
selectCell() and editCell()

I have the following:

if(mygrid.cellById(id,8).getValue() <= mygrid.cellById(id,7).getValue()){
    alert('Some alert');
                
    mygrid.selectCell(id,8);
    mygrid.editCell();
}

But when using editCell() the alert just pops up again three times, and it don't select the cell again in edit state.

Can you please help me.
Answer posted by Support on Feb 23, 2009 06:24
From which place the above code executed

If code executed from onEditCell event, please try to run it by setTimeout, to separate js threads. 
If code executed by clicking on any kind of link|button outside of grid, the issue can be caused by native logic of grid, which closes active editor if click occurs out of grid borders ( you can catch the event and cancel bubbling, or again, use setTimeout to separate your custom code from normal onclick reaction )