Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
755
SpinOnArrowKeys
posted

Can the SpinOnArrowKeys functionality of the default numeric editors be switched off, without adding a custom NumericEditorProvider?

  • 33839
    Verified Answer
    posted

    Hello,

    It is possible to totally customize the default editors.  You'll need to handle the static WebDataGrid event to initialize them.  This will initialize the default editors in the same way for any grid that uses them.  Here is the code you'll need.

    protected void Page_Load(object sender, EventArgs e)
        {
            Infragistics.Web.UI.GridControls.WebDataGrid.InitializeDefaultEditors += new InitializeDefaultEditorsEventHandler(WebDataGrid_InitializeDefaultEditors);
        }

        void WebDataGrid_InitializeDefaultEditors(object sender, DefaultEditorsEventArgs e)
        {
            if (e.NumericEditor != null)
            {
                e.NumericEditor.Buttons.SpinOnArrowKeys = false;
            }
            if (e.DateTimeEditor != null)
            {
            }
        }

     

    regards,

    David Young