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

[Solved] Up/Down arrow keys don't work as expected

1 Answer 402 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Chris Ward
Top achievements
Rank 1
Chris Ward asked on 20 Jul 2011, 07:25 PM
When there is a multiline textbox in the RowDetails of a RadGridView and the up or down arrow key is pressed, while at the top or bottom of the textbox respectively, the RadGridView selection moves to the previous / next row.  Is this supposed to happen, and how can I prevent it from happening?

Edit: As a note, this appears to be happening with all unhandled events.  I understand the functionality of passing unhandled events up the tree, but I'd like to know how to prevent that from happening in certain cases.

1 Answer, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 26 Jul 2011, 02:53 PM
Hello Chris Ward,

  This behavior is controlled by the TextBox itself since it decides whether some keyboard events are handled or not. For example, in the case where you use Down Arrow key in the middle of a text the grid will not execute its move/select logic since the keyboard events will be handled by the TextBox. Contrary, when you press Down Arrow key at the end of a text the grid will executed its keyboard handlers since the TextBox will not handle any events. 

In case you would like to have a TextBox that does not allow any navigation you will have to create a custom TextBox control that handles all KeyDown events. 

All the best,
Milan
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
GridView
Asked by
Chris Ward
Top achievements
Rank 1
Answers by
Milan
Telerik team
Share this question
or