Disable Arrow Keys for RadPageView?

3 posts, 1 answers
  1. Larry
    Larry avatar
    6 posts
    Member since:
    Nov 2014

    Posted 23 Jan Link to this post

    I don't know if I missed a property or if I'll need to use the KeyDown/KeyPress events, but is there an easy or preferred way that I can turn off the feature that allows the right and left arrow keys to navigate through the pages of a RadPageView?

     

    I have an application where I have the tab strip hidden and am programmatically controlling the page navigation.

     

    Thanks.

  2. Answer
    Dimitar
    Admin
    Dimitar avatar
    1871 posts

    Posted 24 Jan Link to this post

    Hi Larry,

    Thank you for writing.

    To disable the arrow keys you need to override the OnKeyDown method: 
    class MyPageView : RadPageView
    {
        protected override void OnKeyDown(KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Left || e.KeyCode == Keys.Right)
            {
                return;
            }
            base.OnKeyDown(e);
        }
    }

    I hope this information is useful. Let me know if you need further assistance.

    Regards,
    Dimitar
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Larry
    Larry avatar
    6 posts
    Member since:
    Nov 2014

    Posted 24 Jan Link to this post

    I suspected I would end up going that route.  Thanks for the information.

     

Back to Top