1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / How to create Dynamic control in module

How to create Dynamic control in module

4 posts, 1 answered
  1. Jmr
    Jmr avatar
    53 posts
    Registered:
    21 Jan 2011
    27 Jan 2011
    Link to this post
    Hi

    Please let us know how to create dynamic control over basic module.for example i have one button named as "Add more".if i press that button it should show another control (like text box).

    I tried with div (document.getElementById('divInsert').innerHTML += "Html Control code") and i am seeing in View source code.That appended html not shows.

    Please let us know the solution.

    Thanks


     
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    27 Jan 2011
    Link to this post
    Hi Mohammad,

    I am not quite sure what you are trying to achieve. Generally if you do not what to post back the page you can use javascript - JQuery, - Show(), Hide() methods.

    Kind regards,
    Ivan Dimitrov
    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
  3. Jmr
    Jmr avatar
    53 posts
    Registered:
    21 Jan 2011
    27 Jan 2011
    Link to this post
    Hi,

    Please check the following images that should be make you scene.
    1) AddMore [Image]
    2) AddMore_after [Image]
    finally Viewsource [Image]
    source file i am not found second textbox code anywhere.

    i try to do inside 'FriendsEmailIDContainer'  div..

    If possible give us sample solution how to add dynamic control over basic module.

    Thanks
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    28 Jan 2011
    Link to this post
    Hi Jmr,

    Please take a look at this sample -How to add / remove textbox dynamically with jQuery

    You can persist the values using  a WCF service and Telerik.Sitefinity.Data.ClientManager

    _PersistValues: function () {
            var serviceUrl = "path to your service"
            var clientManager = this._getClientManager();
            clientManager.InvokeGet(serviceUrl, null, null, this._serviceSuccess, this._serviceFailure);
        },

        _getClientManager: function () {
            if (!this._clientManager) {
                this._clientManager = new Telerik.Sitefinity.Data.ClientManager();
            }

    All the best,
    Ivan Dimitrov
    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
    Answered
4 posts, 1 answered