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

3 posts, 1 answers
  1. Denius
    Denius avatar
    11 posts
    Member since:
    Oct 2015

    Posted 25 Aug Link to this post

    Please , help me
    I must restrict mouse wheel , and keydown also keyUp arrows ... in telerik GridView when numeric field is in edit mode.
  2. Answer
    Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 25 Aug Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Denius
    Denius avatar
    11 posts
    Member since:
    Oct 2015

    Posted 25 Aug in reply to Dimitar Link to this post

    Thank you so much it's works fine !
Back to Top