I added a telerik:RadTabStrip with multipageview option. Then under a pageview I added a Telerik Rotator control.
If I set static value it works fine, but, if I create a datatable in server side and try to bind it to datasource of the rotator control it does not display any data. The code I used -
ASPX Code:
<telerik:RadRotator ID="RadRotator1" runat="server" Width="900px" Skin="Black" EnableEmbeddedSkins="false"
CssClass="rotatorStyle" RotatorType="Buttons" ScrollDuration="500" >
<Items>
<telerik:RadRotatorItem>
<ItemTemplate>
<div class="RotatorItem">
<h2><asp:Label ID="lblTitle" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "title") %>'></asp:Label></h2>
<div class="txt_placeholder">
<asp:Label ID="lblShortDesc" Text='<%# DataBinder.Eval(Container.DataItem, "desc")%>' runat="server"></asp:Label>
</div>
<div class="clear"></div>
</div>
</ItemTemplate>
</telerik:RadRotatorItem>
</Items>
</telerik:RadRotator>
Server Code:
DataTable dt = new DataTable();
dt.Columns.Add("title", typeof(string));
dt.Columns.Add("desc", typeof(string));
dt.Rows.Add("T1", "AAA");
dt.Rows.Add("T2", "BBB");
dt.Rows.Add("T3", "CCC");
RadRotator1.DataSource = dt.DefaultView;
RadRotator1.DataBind();
Can someone please help me with this?
Thanks in advance.
If I set static value it works fine, but, if I create a datatable in server side and try to bind it to datasource of the rotator control it does not display any data. The code I used -
ASPX Code:
<telerik:RadRotator ID="RadRotator1" runat="server" Width="900px" Skin="Black" EnableEmbeddedSkins="false"
CssClass="rotatorStyle" RotatorType="Buttons" ScrollDuration="500" >
<Items>
<telerik:RadRotatorItem>
<ItemTemplate>
<div class="RotatorItem">
<h2><asp:Label ID="lblTitle" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "title") %>'></asp:Label></h2>
<div class="txt_placeholder">
<asp:Label ID="lblShortDesc" Text='<%# DataBinder.Eval(Container.DataItem, "desc")%>' runat="server"></asp:Label>
</div>
<div class="clear"></div>
</div>
</ItemTemplate>
</telerik:RadRotatorItem>
</Items>
</telerik:RadRotator>
Server Code:
DataTable dt = new DataTable();
dt.Columns.Add("title", typeof(string));
dt.Columns.Add("desc", typeof(string));
dt.Rows.Add("T1", "AAA");
dt.Rows.Add("T2", "BBB");
dt.Rows.Add("T3", "CCC");
RadRotator1.DataSource = dt.DefaultView;
RadRotator1.DataBind();
Can someone please help me with this?
Thanks in advance.