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

Disable Arrow Keys for RadPageView?

2 Answers 139 Views
PageView
This is a migrated thread and some comments may be shown as answers.
Larry
Top achievements
Rank 1
Larry asked on 23 Jan 2017, 10:39 PM

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 Answers, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 24 Jan 2017, 08:53 AM
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.
0
Larry
Top achievements
Rank 1
answered on 24 Jan 2017, 12:58 PM

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

 

Tags
PageView
Asked by
Larry
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Larry
Top achievements
Rank 1
Share this question
or