I want to create a RadRotator with Charts (asp.net charting) inside.
I tried a lot of ways to create it, but I couldn't see the charts inside.
the first option:
ascx:
<telerik:RadRotator ID="RadRotator1" runat="server" RotatorType="Buttons"
style="width:300px; height:300px; margin-left:10px; margin-top:30px;" ScrollDuration="500" FrameDuration="2000" ItemHeight="100" ScrollDirection="Up, Down"
ItemWidth="100">
<ItemTemplate>
</ItemTemplate>
</telerik:RadRotator >
cs:
Chart chart = new Chart():
// adding chart styles, etc.
RadRotator1.Items.Add(new RadRotatorItem(chart))
second option:
<telerik:RadRotator ID="RadRotator1" runat="server" RotatorType="Buttons"
style="width:300px; height:300px; margin-left:10px; margin-top:30px;" ScrollDuration="500" FrameDuration="2000" ItemHeight="100" ScrollDirection="Up, Down"
ItemWidth="100" OnItemCreated="RadRotator1_ItemCreated">
<ItemTemplate>
<asp:Chart ID="crtAlerts" runat="server" style="width:100px; Height:100px; margin-top:3px; margin-left:60px">
</asp:Chart
</ItemTemplate>
</telerik:RadRotator>
cs:
protected void RadRotator1_ItemCreated(object sender, Telerik.Web.UI.RadRotatorEventArgs e)
{
Chart crtAlertsPerSZ = e.Item.FindControl("crtAlerts") as Chart;
//adding styles to the chart, etc..
}
In this case, OnItemCreated is not fired.
Is there a way to add asp.net chart control to rad rotator?
Thanks.