I have some problem, iam using some of the aps.net controls and infragistics control. when i press tab i need to set the focus from normal textbox into webcombox which is inside the ultragridWebControl, could you please help me on this.
Regards,
K.Mohan.
Hello,
It looks like this will require overwritting original tab key-mapping. If you want to tab from a textbox directly to another control without normal tab order, this requires custom mapping of the tab key. Is the textbox you are refering to a normal control or a cell within WebGrid?
actually my requirement , i have asp.net textbox control in the page and current forcus set to the textbox. if i pressed tab key i need to focus the cursor to the combo box which inside the ultrawebgrid.
example :
textbox.text = "test"
textbox.setfocus = true;
and i have one ultrawebgrid inside the ultra webgrid contol i have one cell contains webcombo .
now current focus in the txtbox control, but when i press tab key, its should be immediately focus in the combobox which is inside the ultra webgrid.
Also return false to cancel the tab. I did not include that in the snippet above.
Thank you very much.
Regards,K.Mohan
You need to capture the TAB key press and put focus on the cell yourself. The code would look similar to this:
function initialize() { var tb = document.getElementById("TextBox1"); tb.onkeydown = tabHandler;}
function tabHandler(e){
keycode = document.all ? event.keyCode : e.which; if (keycode == 9 /*tab*/) { var grid = igtbl_getGridById(gridId); grid.Rows.getRow(0).getCell(0).activate(); }}
The initialize function should be the handler for the body onload event. The onkeydown event of the textbox is handled to set the first cell in the grid active whenever a TAB key is pressed. Modify to your specification. If you need to get deeper within the grid, you can do so within the handler and activate any element at that point.