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

OnKeyUp event missing?

5 Answers 247 Views
Input
This is a migrated thread and some comments may be shown as answers.
Jeroen Houba
Top achievements
Rank 1
Jeroen Houba asked on 21 Dec 2009, 08:46 AM
Hello,

I am using the Q3 2009 of a RadMaskedTextBox and could not find the OnKeyUp clientside event. It looks like earlier versions of the radinput controls do support this event because it is discussed in this forum.
The OnValueChanging and OnValueChanged events are triggered when the control loses focus so that is to late for my purpose. So is there any way to handle an event right after a user changes the input by a key press in the latest version?

Kind regards,

Jeroen Houba

5 Answers, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 21 Dec 2009, 08:54 AM
Hi Jeroen Houba,

Indeed, there is OnKeyUp client event handler as part of the control's API, but you can still use the event in the same fashion as with regular textboxes:

<telerik:RadMaskedTextBox  onkeyup="MyFunctionName()" />


All the best,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Jeroen Houba
Top achievements
Rank 1
answered on 21 Dec 2009, 09:48 AM
Hello Dimo,

Thank you for your reply. That will work just fine for me.
Is there a reason why the onkeyup is not integrated in the API of the control? I would have expected it there.

Kind regards,

Jeroen Houba
0
Dimo
Telerik team
answered on 21 Dec 2009, 11:19 AM
Hi Jeroen,

I am not sure there is a specific reason for not including the keyup/down events in the API, but generally, they are a lot more rarely used and also, handling them in the same way as keypress might slow down responsiveness in IE.

Greetings,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Mohamed Bahri
Top achievements
Rank 1
answered on 13 Apr 2010, 06:31 PM
Hi, I have a issue with the onkeyup event,

<telerik:RadNumericTextBox ID="TextBox2" runat="server" Type="Number"   
                            NumberFormat-DecimalDigits="0" onkeyup="JS_Recalculate()" > 
                            </telerik:RadNumericTextBox> 

When the event is fired, (on IE) I get the value prior to the change. For example I have 10 and I add a 0 so I expect to have 100 when the event is fired. Instead I got 10.
Am I doing something wrong?
This was working with the asp:Textbox .

Thanks for your help.
0
Maria Ilieva
Telerik team
answered on 16 Apr 2010, 09:33 AM
Hello Mohamed,

I tried the scenario by using get_textBoxValue() method for getting the RadNumericTextBox value and found its working fine. Give a try with this:

ASP:
<telerik:RadNumericTextBox ID="TextBox2" runat="server" Type="Number"    
  NumberFormat-DecimalDigits="0" onkeyup="onkeyupEvent()" >  
</telerik:RadNumericTextBox>

JavaScript:
<script type="text/javascript">  
function onkeyupEvent()  
{
    var text = $find("<%= TextBox2.ClientID %>").get_textBoxValue();   
    alert (text);   
}  
</script>


Kind regards,
Maria Ilieva
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Input
Asked by
Jeroen Houba
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Jeroen Houba
Top achievements
Rank 1
Mohamed Bahri
Top achievements
Rank 1
Maria Ilieva
Telerik team
Share this question
or