I'm trying to dynamically add a Rotator Control from code behind, but can't figure out how to get the ItemTemplate in there. I saw this thread (http://www.telerik.com/forums/how-do-i-add-items-to-a-rotator-programmatically), but that has references to some declarative code.
Is there some sample code for adding a Rotator control "completely" from code behind available somewhere?
Thx in advance!
5 Answers, 1 is accepted
I have attached a sample page that shows how to configure the ItemTemplate from code behind. Please use it as a reference for incorporating the desired functionality.
I know this post is old but would like some help following the same thought.
Would do just that this same example using RadChart instead of the images?
I need to use a RadRotator to display multiple graphs that will be added dynamically.
I'm waiting, thanks.
Please clarify whether you refer the obsolete RadChart control or RadHtmlChart. In both cases you can replace the image in the ItemTemplate of RadRotator with a programmatically created chart control in the example from my previous post. You can use the following examples as a reference for implementing the desired functionality:
- Creating RadChart Programmatically (RadChart)
- Creating RadChart Programmatically - more complex example (RadChart)
- Programmatic Chart Creation (RadHtmlChart)
I hope this helps. Feel free to contact us again if you run into more difficulties.
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
i am also facing the same problem.
now i am unable to add charts to the rotator from code behind.
i have charts which are user controls, cant i add chart objects to the radrotator from code behind?
client side i am able to add but i want from code behind.
help me out from this. thanks in advance.
No thanks :)
i worked on it ! and i did it :)