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
KeyDown event of default NumericEditor not fired
posted

I use the WebDataGrid.InitializeDefaultEditors.

In my event handler I have written the following code:

void OnInitializeDefaultEditors(object sender, DefaultEditorsEventArgs e)
{
   e.NumericEditor.Buttons.SpinOnArrowKeys = false;
   e.NumericEditor.ClientEvents.KeyDown = "j_onNumericEditorKeyDown";
}

The SpinOnArrowKeys is succesfully disabled, but the KeyDown event is not fired.

Parents
  • 24497
    Verified Answer
    posted

    Hi,

    I added your codes to a sample page with grid, but I could not reproduce that issue. I implemented KeyDown by following, and event was raised for all keys including up/down arrows (output lines were "key:38", "key:40").

     <script type="text/javascript">
     function j_onNumericEditorKeyDown(editor, args)
     {
      _bug4('key:'+args.get_browserEvent().keyCode);
     }
     </script>

    I tested IE7 and Firefox.
    It is possible that something else interacts with key events. I suggest you to test a temporary page which has only grid and that event handler.

Reply Children