Create radrotator items programmatically

Posted by Community Admin on 04-Aug-2018 06:45

Create radrotator items programmatically

All Replies

Posted by Community Admin on 23-May-2012 00:00

Can someone tell me why this code doesn't work?

<telerik:RadRotator ID="rotator1" runat="server" Width="800px" Height="150px" SlideShowAnimation-Type="Fade" SlideShowAnimation-Duration="500" ItemHeight="63" ItemWidth="125" RotatorType="Buttons" OnClientItemShown="OnClientItemShown"></telerik:RadRotator>

var item = new Telerik.Web.UI.RadRotatorItem();
item.Controls.Add(new LiteralControl("<div>1</div>"));
rotator1.Items.Add(item);

Posted by Community Admin on 23-May-2012 00:00

You should probably ask that on the appropriate RadControls public forum.
http://www.telerik.com/community/forums/aspnet-ajax/rotator.aspx

I would suspect it has something to do with needing to instantiate a template.

Posted by Community Admin on 23-May-2012 00:00

Hi,

Actually I am not sure what the final result should be. I suggest that you should go through official documentation and demos that will help you.

Regards,
Ivan Dimitrov
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 01-Jun-2012 00:00

I wasn't realy happy with the RAD Rotator so I looked for JQuery Solutions to solve the problem.  I don't know your proficiency level with JQuery but this library was really easy to work with and they give you the CSS so you can pare it down to what you need.  If you find you don't like it is as well, I'd recommend jShowOff

You can see my example on http://preview.columbiagasva.com/

This thread is closed