Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by richard white on Dec 07, 2008 10:49
open dhtmlx forum
on tab press

hi

i have a grid with 3 columns

when the user clicks the tab button i only want to control the cell its goes to. in my example i need it to only tab through the center column and not the left or right columns

how can i control the tab in this manner please

thanks

Answer posted by Support on Dec 08, 2008 02:04
a) If the center column is only editable one , you can use 
 grid.enableEditTabOnly();

b) you can use onTab event to manually set next cell in focus

mygrid.attachEvent("onTab",function(){
     var ind = mygrid.getRowIndex(mygrid.getSelectedRowId())+1;
     var cind=mygrid.getSelectedCellIndex();
     if (ind==this.getRowsNum()) return true; // last row in grid
     mygrid.selectCell(ind,cind); 
     mygrid.editCell();
     return false;
});