Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by andreea on Oct 15, 2008 08:48
open dhtmlx forum
select next cell, after a "co" cell was eddited

Is there possible that after I edit a cell (a "co" type one), the next cell to be sected ?

I have tried this an the end of the doOnCellEdit fucntion :
if(state==2)
{
mygrid.selectCell(mygrid.cellByIndex(rowId,cellInd),cellInd+1);
}


..and it dindn't work
Answer posted by Support on Oct 15, 2008 09:30
a) When onEditCell event called the editor already closed, but editor closing may be caused by different reasons, and it may be possible that after closing editor grid will executed some other command , which will affect selection in grid. To be sure that your code executed after all built-in logic finished , you can use timeout with 1ms delay 

b) the selectCell command  require a row index as first parameter
if(state==2) 

   window.setTimeout(function(){
         //you can use here any local variables
         mygrid.selectCell(mygrid.getRowIndex(rowId),cellInd+1); 
  },1);
}