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

Disable Arrow Keys

5 Answers 474 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Pejman
Top achievements
Rank 1
Pejman asked on 03 Nov 2010, 03:39 PM
Hello
Please help me!
How can I disable Arrow keys in Telerik GridView ??

5 Answers, 1 is accepted

Sort by
0
Pejman
Top achievements
Rank 1
answered on 04 Nov 2010, 06:50 AM
I want to disable arrow keys in  gridview . Is it possible?

How can I disable Left and Right keys in Winform GridView?
0
Phi
Top achievements
Rank 1
answered on 04 Nov 2010, 02:25 PM
I think you have to override the default behavior of the grid. Look at this example here
0
Richard Slade
Top achievements
Rank 2
answered on 04 Nov 2010, 03:29 PM
Phi is correct in the way to do this..
This is an exmaple of how to disable the left, right, up and down arrow keys

Public Class CustomGridBehavior
    Inherits BaseGridBehavior
  
    Public Overrides Function ProcessKey(ByVal keys__1 As KeyEventArgs) As Boolean
        Select Case keys__1.KeyCode
            Case Keys.Up, Keys.Down, Keys.Left, Keys.Right
                Return False
            Case Else
                Return MyBase.ProcessKey(keys__1)
        End Select
    End Function
  
End Class


and after binding the grid (for exmaple)
Me.RadGridView.GridBehavior = New CustomGridBehavior()

hope that helps. Let me know if you need further help
Richard
0
Pablo
Top achievements
Rank 1
answered on 17 Sep 2013, 03:23 PM
It's exactly what I need, but how do I use that in Silverlight since the Silverlight Telerik's RadGridView version doesn't have the "GridBehavior" property?

Thanks in advance.
0
Nikolay
Telerik team
answered on 18 Sep 2013, 08:27 AM
Hi Pablo,

I would kindly ask you to open a new forum thread about this topic in the appropriate Silverlight forum section, as the current thread is about the WinForms suite. This will allow our community that is interested in the topic to find the answer more easily.

Thank you for your understanding and cooperation.

Regards,
Nikolay
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
GridView
Asked by
Pejman
Top achievements
Rank 1
Answers by
Pejman
Top achievements
Rank 1
Phi
Top achievements
Rank 1
Richard Slade
Top achievements
Rank 2
Pablo
Top achievements
Rank 1
Nikolay
Telerik team
Share this question
or