Create RadNumericTextBox By JavaScript

3 posts, 1 answers
  1. Daniel
    Daniel avatar
    159 posts
    Member since:
    Feb 2014

    Posted 21 Apr 2015 Link to this post


    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?


  2. Answer
    Eyup avatar
    3644 posts

    Posted 24 Apr 2015 Link to this post

    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:

    Hope this helps.


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

  3. Daniel
    Daniel avatar
    159 posts
    Member since:
    Feb 2014

    Posted 29 Apr 2015 in reply to Eyup Link to this post

    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.

Back to Top