RadNumericTextBox Tab key OnKeyPress event

3 posts, 1 answers
  1. Marcin
    Marcin avatar
    165 posts
    Member since:
    Jan 2011

    Posted 18 Jul 2012 Link to this post

    Hello, I have issue with Tab key (9) pressed on radnumerictextbox. This key is not handled by OnKepPress event  in clientevents. I mean it is handled only in firefox. In IE, Chrome or Safari when pressing TAB, OnKeyPress is not fired. Other keys are working, just this one (I checked few). Is there any workaround to have TAB key handled by RadNumericTextBox in IE and Chrome?

    Kind Regards
    Marcin

    P.S. I'm using version 2010.3.1317.40
  2. Answer
    O.D.
    O.D. avatar
    13 posts
    Member since:
    Nov 2008

    Posted 18 Jul 2012 Link to this post

    Hello Marcin,

    In order To capture tab key, the OnKeyDown event will work, on all browsers.

    Here's a forum post, which I'm sure contains most of the answer you would be looking for :
    http://www.telerik.com/community/forums/aspnet-ajax/input/counting-characters.aspx 

    In the post, the goal, is more of a character counter, but the problematic is about the same, which is, capturing non-alphanumeric characters.

    this works for me, same implementation as Chris on the referenced post, without the browsers if condition :
    <telerik:RadNumericTextBox runat="server" ID="txtNumericValue1" ShowSpinButtons="true"
      onkeydown="NumericValue1KeyDown(this,event)" />

       function NumericValue1KeyDown(sender, e) {
                var key = e.keyCode;
                alert(key);
    }

    Kind Regards,
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Marcin
    Marcin avatar
    165 posts
    Member since:
    Jan 2011

    Posted 19 Jul 2012 Link to this post

    Thank you
Back to Top