Disable Arrow Keys

6 posts, 0 answers
  1. Pejman
    Pejman avatar
    2 posts
    Member since:
    Nov 2010

    Posted 03 Nov 2010 Link to this post

    Hello
    Please help me!
    How can I disable Arrow keys in Telerik GridView ??
  2. Pejman
    Pejman avatar
    2 posts
    Member since:
    Nov 2010

    Posted 04 Nov 2010 Link to this post

    I want to disable arrow keys in  gridview . Is it possible?

    How can I disable Left and Right keys in Winform GridView?
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Phi
    Phi avatar
    47 posts
    Member since:
    Dec 2008

    Posted 04 Nov 2010 Link to this post

    I think you have to override the default behavior of the grid. Look at this example here
  5. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 04 Nov 2010 Link to this post

    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
  6. Pablo
    Pablo avatar
    7 posts
    Member since:
    May 2013

    Posted 17 Sep 2013 Link to this post

    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.
  7. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 18 Sep 2013 Link to this post

    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 >>
Back to Top
UI for WinForms is Visual Studio 2017 Ready