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

Create RadNumericTextBox By JavaScript

2 Answers 127 Views
Input
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 21 Apr 2015, 08:49 AM

Hello,

I'm working on a project that should contain a RadNumericTextBox.

The project requirements are that when the user clicks a button, a RadNumericTextBox will be created dynamically on the client side.

The RadNumericTextBox will contain a SpinButton and also validation of MinValue, MaxValue.

 

How to do this in Client-Side using JS?

Thanks,
Daniel

2 Answers, 1 is accepted

Sort by
0
Accepted
Eyup
Telerik team
answered on 24 Apr 2015, 06:54 AM
Hi Daniel,

RadNumericTextBox is a server-side control and it needs to be initiated on the server-side. To implement your requirement, you can use AJAX to achieve fast and instant creation of the numeric textbox dynamically. For example, you can define an asp:PlaceHolder declaratively in the mark-up of the aspx page and on a button click action create and add a RadNumericTextBox to the Controls collection of the PlaceHolder.

Alternatively, you can declare the RadNumericTextBox on the mark-up and hide it initially using its Display property. Then, you will be able to access it on the client-side and change its visibility to True using the set_visible() method.

You can also check other technology options:
http://demos.telerik.com/kendo-ui/numerictextbox/index

Hope this helps.

Regards,
Eyup
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Daniel
Top achievements
Rank 1
answered on 29 Apr 2015, 09:09 AM
Hello Eyup,

Thank you for your answer.

Our project requirements are that creation of many different controls is done only on the client side.

So we have decided to use a standard html input control with JavaScript validations, that operates like the validation of RadNumericTextBox control.

 
Thanks,
Daniel.
Tags
Input
Asked by
Daniel
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Daniel
Top achievements
Rank 1
Share this question
or