-
12 May 2009 7:41 AM #1
EditorGrid setting tab Order on cells
EditorGrid setting tab Order on cells
I have an editorGrid in which i want to set the tab order on the cells after the grid is rendered.
how do i do this?
Someone posted this as an ExtJS solution...but I don't know how to translate it to EXT GWT.
Code:onEditorKey : function(field, e){ var k = e.getKey(), newCell, g = this.grid, ed = g.activeEditor; if(k == e.TAB){ if(e.shiftKey){ newCell = g.walkCells(ed.row, ed.col-1, -1, this.acceptsNav, this); }else{ newCell = g.walkCells(ed.row, ed.col+1, 1, this.acceptsNav, this); } e.stopEvent(); }else if(k == e.ENTER){ ed.completeEdit(); e.stopEvent(); }else if(k == e.ESC){ e.stopEvent(); ed.cancelEdit(); } if(newCell){ g.startEditing(newCell[0], newCell[1]); } }
-
12 May 2009 11:40 AM #2
tab order is the same as the cells in the editor grid.
Like it starts from the first editable cell and go along all the editable columns and then goes to the next row.
-
13 May 2009 3:04 AM #3
I agree that is how the tab order works by default. I want to be able to skip over some editable columns in the tab order but still have them editable if someone clicks on the cell itself.
-
15 May 2009 8:21 AM #4
you can try setting the tab order for the editor fields. If that doesnot work.. my guess is to set the cell selection manually and start editing , each time you encounter a cell you want to skip.


Reply With Quote