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

Disable mouse wheel and KeyUp and KeyDown Telerik GridView edit mode for Numeric field

2 Answers 125 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Denius
Top achievements
Rank 1
Denius asked on 25 Aug 2016, 11:05 AM
Please , help me
I must restrict mouse wheel , and keydown also keyUp arrows ... in telerik GridView when numeric field is in edit mode.

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 25 Aug 2016, 12:02 PM
Hi Goran,

Thank you for writing.

You need to set the InterceptArrowKeys and EnableMouseWheel properties of the editor. This can be done in the CellEditorInitialized event handler:
private void RadGridView1_CellEditorInitialized(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e)
{
    var editor = e.ActiveEditor as GridSpinEditor;
    if (editor != null)
    {
        var element = editor.EditorElement as GridSpinEditorElement;
        element.InterceptArrowKeys = false;
        element.EnableMouseWheel = false;
    }
}

Let me know if you have additional questions.

Regards,
Dimitar
Telerik by Progress
Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
0
Denius
Top achievements
Rank 1
answered on 25 Aug 2016, 12:11 PM
Thank you so much it's works fine !
Tags
GridView
Asked by
Denius
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Denius
Top achievements
Rank 1
Share this question
or