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

RadNumericTextBox Tab key OnKeyPress event

2 Answers 209 Views
Input
This is a migrated thread and some comments may be shown as answers.
Marcin
Top achievements
Rank 1
Veteran
Marcin asked on 18 Jul 2012, 06:29 AM
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 Answers, 1 is accepted

Sort by
0
Accepted
O.D.
Top achievements
Rank 1
answered on 18 Jul 2012, 02:27 PM
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,
0
Marcin
Top achievements
Rank 1
Veteran
answered on 19 Jul 2012, 05:34 AM
Thank you
Tags
Input
Asked by
Marcin
Top achievements
Rank 1
Veteran
Answers by
O.D.
Top achievements
Rank 1
Marcin
Top achievements
Rank 1
Veteran
Share this question
or