I have a webgrid that shows 8 cells, but only 1 of the cells is input and the rest are display only. After making a change in the input cell, I want to either press the Tab or the down-arrow to go down to that cell on the next record (ie. suppress the tab stops in the other cells). Is there any way to do this?
The DisplayLayout.ClientSideEvents.EditKeyDownHandler is not firing when the Column.Type of last cell is DropDownList or CheckBox. Here is the java script we used.
//Get the cell being edited
//Get the row of the cell being edited
//Key Codes Tab = 9
//If tab key
// last row and last column
row = igtbl_addNew(gridName, 0);
// Always move to the first cell and begin edit it
row.getCell(0).activate();
row.getCell(0).beginEdit();
}
You need to handle the grid's DisplayLayout.ClientSideEvents.EditKeyDownHandler and DisplayLayout.ClientSideEvents.KeyDownHandler events. Then you can handle the tab and arrow keys, navigate to the cell that you want to make active and return true to cancel the grid's default navigation.