How can you set up the grid, so that when the user tabs, only editable cells are in the tab order?
As far as I know you'd have to use javascript to do this.
Java script:
function OnUwgKeyDown(gn,cellId,KeyStroke) { // Tab Key if (KeyStroke == 9) { SelectNextCell(gn); return true; }}
function SelectNextCell(gridClientId){ var grid = igtbl_getGridById(gridClientId); var cell = grid.getActiveCell(); if(cell != undefined && cell != null) { var nextCell = cell.getNextTabCell(); while(nextCell != undefined && nextCell.isEditable() == false) { nextCell = nextCell.getNextTabCell(); } if(nextCell != undefined) { cell.setSelected(false); nextCell.activate(); nextCell.setSelected(true); } }}
Grid:
Thats what I originally tried to do but I am using WebNumericEdit and the KeyDown there is swallowing up the grids keydown, so the grids event never fires.
I started playing with the CSOM events provided for the webcombo
MLongin said: So I started trying this route, and realized I also use webcombos that seem to have non fully implemented onkeydown events. When the event is fired, the keycode is not passed. Anyway to determine which keycode is fired in a webcombo?
So I started trying this route, and realized I also use webcombos that seem to have non fully implemented onkeydown events. When the event is fired, the keycode is not passed. Anyway to determine which keycode is fired in a webcombo?
The best I can come up as an idea would be to study the rendered html of a WebCombo and try to add the onkeydown to something in the rendered html. How are you hooking up to the onkeydown event right now?
I started playing with that one, seems on the right track, but gotta find a way to not have it fire when a user just mouse clicks on it.
can you try using the client side event CellChangeHandler for the grid and write javascript in this function to change the focus to the cell you want.
This will work even though when you have the web Numeric Editors.