7 Answers, 1 is accepted
0
Hi Ali,
You can use onchange event handler. This event is fired when the contents are committed. For example, on a text box, this event is not fired while the user is typing, but rather when the user commits the change by leaving the text box that has focus. In addition, this event is executed before the code specified by onblur when the control is also losing the focus.
The following example demonstrates how to execute some JavaScript code when a user changes the content of an TextBox control:
All the best,
Plamen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
You can use onchange event handler. This event is fired when the contents are committed. For example, on a text box, this event is not fired while the user is typing, but rather when the user commits the change by leaving the text box that has focus. In addition, this event is executed before the code specified by onblur when the control is also losing the focus.
The following example demonstrates how to execute some JavaScript code when a user changes the content of an TextBox control:
<div> |
<script type="text/javascript"> |
function change() { |
var manager = $find("<%= RadInputManager1.ClientID %>"); |
var numericInput = manager.get_targetInput("<%= TextBox1.ClientID %>"); |
numericInput.clear(); |
} |
</script> |
<telerik:RadInputManager ID="RadInputManager1" runat="server"> |
<telerik:NumericTextBoxSetting EmptyMessage="type here..."> |
<TargetControls> |
<telerik:TargetInput ControlID="TextBox1" /> |
</TargetControls> |
</telerik:NumericTextBoxSetting> |
</telerik:RadInputManager> |
<asp:TextBox onchange="change();" ID="TextBox1" runat="server"> |
</asp:TextBox> |
</div> |
All the best,
Plamen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Ali
Top achievements
Rank 1
answered on 10 Nov 2008, 05:04 PM
Actually I need two arguments (Source and EventArgs) in the ValueChanged event. I can pass Source but EventArgs is not possible in suggested solution.
I am already taking decicion on EventArgs and I've around 30+ input controls on a single page. So is there any other way to hook ValueChanged event with Source and EventArgs parameters?
Thanks
Ali
I am already taking decicion on EventArgs and I've around 30+ input controls on a single page. So is there any other way to hook ValueChanged event with Source and EventArgs parameters?
Thanks
Ali
0
Hi Ali,
Please find attached a sample web application that demonstrates the needed approach.
Greetings,
Plamen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Please find attached a sample web application that demonstrates the needed approach.
Greetings,
Plamen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Ali
Top achievements
Rank 1
answered on 12 Nov 2008, 11:28 AM
how can I get old value, eg. eventArgs.get_oldValue() ?
Ali
Ali
0
Hello Ali,
There is no way to get the old value at the moment. This is certainly a limitation of our RadInputManager control and we will be working on solving the problem with the next release. We apologize for the inconvenience this might be causing you.
Having any other questions, please feel free to contact us.
All the best,
Plamen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
There is no way to get the old value at the moment. This is certainly a limitation of our RadInputManager control and we will be working on solving the problem with the next release. We apologize for the inconvenience this might be causing you.
Having any other questions, please feel free to contact us.
All the best,
Plamen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Rogerick
Top achievements
Rank 1
answered on 13 Jul 2009, 08:23 PM
I can't download sample application. It says the it doesn't exist or the location has changed. Could you repost the application?
Thanks.
0
Hi Rogerick,
I am re-attaching the application in this post.
Please check it out and let me know if any issues arise.
Greetings,
Iana
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
I am re-attaching the application in this post.
Please check it out and let me know if any issues arise.
Greetings,
Iana
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.