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

[Solved] Creating RadNumericTextBox at runtime

3 Answers 166 Views
Input
This is a migrated thread and some comments may be shown as answers.
Raju Kumar
Top achievements
Rank 1
Raju Kumar asked on 26 May 2008, 02:27 PM
Hi,
  I am creating a

RadNumericTextBox

 at runtime(server side) and want to add a javascript function on textbox "onblur" event. I am doing it as 'Controlid.attributes.add()'

Now in javascript i want to put this textbox value to another

RadNumericTextBox

can you please tell me the steps that i need to follow for this.

Thanks
Raju.


3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 27 May 2008, 07:59 AM
Hi Raju,

Try adding the JavaScript event for the RadNumericTextBox as shown below.

CS:
RadNumericTextBox numtxbx = new RadNumericTextBox(); 
            numtxbx.Attributes.Add("OnBlur", "return Show();"); 
            numtxbx.ID = "RadNumericTextBox1"


JS:
<script type="text/javascript" language="javascript"
      function Show() 
      { 
       alert('Hello') 
      } 
  </script> 


Thanks
Shinu.
0
Raju Kumar
Top achievements
Rank 1
answered on 27 May 2008, 11:40 AM
Hi Shinu,
   Thanks for the reply but this is not i was looking for. I am looking for the way to set the value of the telerik RadNumericTextBox through javascript. Also this javascript function will be associated with a button on runtime with "atrributes.add()". I hope u got my point.

Thanks
Raju
0
Pavel
Telerik team
answered on 29 May 2008, 08:03 AM
Hello Raju,

I have prepared a small sample which illustrates how you can achieve the desired functionality. Give it a try and let us know if you have more question or further assistance is needed.

Greetings,
Pavel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Input
Asked by
Raju Kumar
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Raju Kumar
Top achievements
Rank 1
Pavel
Telerik team
Share this question
or