Accessing control values in dynamically added templates

4 posts, 0 answers
  1. Eddie
    Eddie avatar
    11 posts
    Member since:
    Jun 2007

    Posted 28 Aug 2009 Link to this post

    Hello, I have a toolbar that I'm dynamically adding templates with controls (textboxes, radcombobox, etc.) to via server-side code when the page is first loaded.  The intention is to have the user fill in those controls, then click a 'Run' button on the same toolbar. My problem is that in the postback for the Run button the values for the dynamically-added controls aren't persisting.  I could easily re-setup the controls again, but how do I capture the values the user entered?

    I suspect I'd have to do something with the client-side trackChanges() and commitChanges() functions, but am not sure how to make use of those in this scenario.  Most examples I've seen involve a single javascript function that wraps these around some toolbar changes that the function itself does, and I'm not sure how to use these to persist values that the user has entered into dynamically added templates.

    Any help would be greatly appreciated!

    -Eddie
  2. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 31 Aug 2009 Link to this post

    Hello Eddie,

    Did you follow the method suggested in this help topic? I just tested it with a textbox and the values entered persisted after postback. Let me know if you need a demo project of this.


    Kind regards,
    Peter
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Eddie
    Eddie avatar
    11 posts
    Member since:
    Jun 2007

    Posted 31 Aug 2009 Link to this post

    Hi Peter,

    Yes, that example is what I based my code on.  In order to meet my deadline I just instantiated my controls in a panel, but if you could provide an example project then I can give the toolbar another shot.

    Thanks much!

    Eddie
  5. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 03 Sep 2009 Link to this post

    Hi Eddie,

    Please, test the attached demo. You can modify it to reproduce the problem and send it back to us for further testing.


    Greetings,
    Peter
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top