I am trying to set the Box2's value to (100 - Box1.value). I tried several things but it seems that OnTextChanged does not work as expected. I get method not supported error. In other cases i get an error } is missing. Any ideas? Link? thanks
7 Answers, 1 is accepted
0
Hello El,
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.
I tested the described scenario, however was not able to replicate the issue you are facing. Please find attached a sample project that works as expected.
Let us know if it helps and if further assistance is needed.
Kind regards,
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.
0

El
Top achievements
Rank 1
answered on 22 Apr 2010, 12:44 PM
No it works fine on the server-side. I want to update the radnumerictextbox on client-side.
As soon as you change the value in the Box1 the Box2 should be updated with 100 - Box1.value. So it would be nice if i don't need to wait that Box1 gets lost the focus. Thanks
As soon as you change the value in the Box1 the Box2 should be updated with 100 - Box1.value. So it would be nice if i don't need to wait that Box1 gets lost the focus. Thanks
0
Hi El,
In order to chnage the value of the second input during the first box entering you should apply the action (javascript) to the OnValueChanging Event
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.
In order to chnage the value of the second input during the first box entering you should apply the action (javascript) to the OnValueChanging Event
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.
0

El
Top achievements
Rank 1
answered on 23 Apr 2010, 10:17 PM
Ok it makes sense but, i am not very skillful in Javascript so would you please make a little favor to me and give me the script for this pseudo code:
function1(sender, eventArgs){
Box2.value = 100 - Box1.value;
}
function2(sender, eventArgs){
Box1.value = 100 - Box2.value;
}
Thank you very much in advance
function1(sender, eventArgs){
Box2.value = 100 - Box1.value;
}
function2(sender, eventArgs){
Box1.value = 100 - Box2.value;
}
Thank you very much in advance
0
Hi El Dim,
Improving your Javascript skills a little will make using RadControls and the ASP.NET AJAX client library a lot easier for you, so I recommend doing it. With regard to this particular case, please refer to the following pages:
http://demos.telerik.com/aspnet-ajax/input/examples/programming/clientside/apievents/defaultcs.aspx
http://www.telerik.com/help/aspnet-ajax/input_clientsidebasics.html
http://www.telerik.com/help/aspnet-ajax/input_clientsideradnumerictextbox.html
Best wishes,
Dimo
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.
Improving your Javascript skills a little will make using RadControls and the ASP.NET AJAX client library a lot easier for you, so I recommend doing it. With regard to this particular case, please refer to the following pages:
http://demos.telerik.com/aspnet-ajax/input/examples/programming/clientside/apievents/defaultcs.aspx
http://www.telerik.com/help/aspnet-ajax/input_clientsidebasics.html
http://www.telerik.com/help/aspnet-ajax/input_clientsideradnumerictextbox.html
Best wishes,
Dimo
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.
0

El
Top achievements
Rank 1
answered on 26 Apr 2010, 12:49 PM
Thanks for the links but i found them not very useful for what i am trying to do.
If there is someone willing to help me with this it would be much appreciated!
I guess that for JS gurus this is a very simple task. I just need to assign value to another radnumeric textbox according the value of the first one. That's all i need.
Thanks in advance!
If there is someone willing to help me with this it would be much appreciated!
I guess that for JS gurus this is a very simple task. I just need to assign value to another radnumeric textbox according the value of the first one. That's all i need.
Thanks in advance!
0
Hello El Dim,
Here is an example for you. However, I will appreciate if you tell us what in the provided help articles and demos was hard for you to understand and implement. In this way, we can improve our documentation.
Greetings,
Dimo
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.
Here is an example for you. However, I will appreciate if you tell us what in the provided help articles and demos was hard for you to understand and implement. In this way, we can improve our documentation.
<%@ Page Language="C#" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
meta
http-equiv
=
"content-type"
content
=
"text/html;charset=utf-8"
/>
<
title
>RadControls</
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
asp:ScriptManager
ID
=
"ScriptManager1"
runat
=
"server"
/>
<
telerik:RadNumericTextBox
ID
=
"RadNumericTextBox1"
runat
=
"server"
Label
=
"TB1"
>
<
ClientEvents
OnValueChanged
=
"ValueChanged1"
/>
</
telerik:RadNumericTextBox
>
<
br
/><
br
/>
<
telerik:RadNumericTextBox
ID
=
"RadNumericTextBox2"
runat
=
"server"
Label
=
"TB2"
>
<
ClientEvents
OnValueChanged
=
"ValueChanged2"
/>
</
telerik:RadNumericTextBox
>
<
script
type
=
"text/javascript"
>
function ValueChanged1(sender, args)
{
var tb2 = $find("<%= RadNumericTextBox2.ClientID %>");
tb2.set_value(100 - args.get_newValue());
}
function ValueChanged2(sender, args)
{
var tb1 = $find("<%= RadNumericTextBox1.ClientID %>");
tb1.set_value(100 - args.get_newValue());
}
</
script
>
</
form
>
</
body
>
</
html
>
Greetings,
Dimo
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.