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

Accessing control values in dynamically added templates

3 Answers 54 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Eddie
Top achievements
Rank 2
Eddie asked on 28 Aug 2009, 03:02 PM
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

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 31 Aug 2009, 04:24 PM
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.
0
Eddie
Top achievements
Rank 2
answered on 31 Aug 2009, 04:42 PM
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
0
Peter
Telerik team
answered on 03 Sep 2009, 07:37 AM
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.
Tags
ToolBar
Asked by
Eddie
Top achievements
Rank 2
Answers by
Peter
Telerik team
Eddie
Top achievements
Rank 2
Share this question
or