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

disable key ENTER to go to next line(row)

3 Answers 351 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.
Miclei Bononi
Top achievements
Rank 1
Miclei Bononi asked on 03 Aug 2011, 06:43 PM
hello, I'm working with RadGridView and put a checkbox to select the row that I want. It turns out that if I selected the row and click key Enter, and undo my selection goes to the next row. I put a treatment in the KeyDown event and it works, just that when I edit the cell and give a finish and it deselects ENTER and go to the next line .. how to disable it?

3 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 04 Aug 2011, 06:29 AM
Hi Miclei Bononi,

You may try to predefine the behavior of the default keyboard command provider. Please take a look at this blog post for a reference.
Let me know in case you need any further assistance.
 

Kind regards,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
AndreasW
Top achievements
Rank 1
answered on 01 Mar 2012, 02:48 PM
Hi,
I need to accomplish the same, but in my case the RadGridView are created as a datatemplate for a RadTabController, so I cant refere to it from the code-behind as in the blog post. 

Any idea on how to solve it in my case?



Greetings 
Andreas
0
Maya
Telerik team
answered on 02 Mar 2012, 08:48 AM
Hello Andreas,

You can try creating an attached behavior that sets the keyboard command provider and attach it to those RadGridView-s that you want. Another possible approach would be to find them through ChildrenOfType<T>() extension method (as children of RadTabControl/Item) and set it there.  

Regards,
Maya
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
GridView
Asked by
Miclei Bononi
Top achievements
Rank 1
Answers by
Maya
Telerik team
AndreasW
Top achievements
Rank 1
Share this question
or