This is a migrated thread and some comments may be shown as answers.

[Solved] TextBox focus with keyboard navigation

5 Answers 178 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Michael Arocho
Top achievements
Rank 2
Michael Arocho asked on 26 Aug 2009, 02:23 PM
Hello,

I have a RadGrid that i am using for edit mode only, in a spreadsheet type scenario.  This means that i will not be performing any sort of row selection.  Currently i can start from the first control and tab through the remaining controls exactly like i want.  However what i am trying to do now is provide keyboard up and down support so they can choose to select boxes in that way.

I basically have 3 columns of editable data.  At the moment if you tab it goes from box 1 row 1 to box 2 row 1 to box 3 row 1 to box 1 row 2.  This is how i want tabbing to work.

For the up down if i am on box 1 row 1 and i hit down i want it to go to box 1 row 2 then box 1 row 3 then if i only have 3 rows and hit down again i want it to go to box 1 row 1.

Is there any way to build support for this?

5 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 26 Aug 2009, 02:37 PM
Hi Michael,

I think that the directions and sample projects from the following code library entry on our site can help you implement the spreadsheet-like functionality with our web grid control.

Best regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Michael Arocho
Top achievements
Rank 2
answered on 26 Aug 2009, 02:38 PM
Checking it out now, thanks
0
Michael Arocho
Top achievements
Rank 2
answered on 26 Aug 2009, 03:06 PM
I figured i was going to have to use the onkeydown.  The part of the article that i would have been looking for just says

"use the client side onkeypress to do this"

I am using the onkeydown event handler passing in the control itself and the event.

From having just the control is there a way on the client i can find out which row it is in, go to the next row and get the textbox with the same server side control id?
0
Accepted
Sebastian
Telerik team
answered on 26 Aug 2009, 03:20 PM
Hi Michael,

There is a sample project down below in the code library thread (posted on Jun 23) which demonstrates how to navigate between the textboxes using the arrow keys from the keyboard. Examine it and let us know if we can provide additional assistance.
 
Best regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Michael Arocho
Top achievements
Rank 2
answered on 26 Aug 2009, 04:41 PM
Awesome!  I was able to massage the code in that sample to work for my needs.  Thanks very much
Tags
Grid
Asked by
Michael Arocho
Top achievements
Rank 2
Answers by
Sebastian
Telerik team
Michael Arocho
Top achievements
Rank 2
Share this question
or