I have nested cmsrepeaters
<cms:CMSRepeater ID="Homepage" runat="server" Path="/%" ClassNames="CriticalCare.ArticleType" OrderBy="NodeOrder" OnItemDataBound="CategoryRepeater_ItemDataBound">
<ItemTemplate>
<cms:CMSRepeater ID="ArticleTypes" runat="server">
<HeaderTemplate>
<div class="feature-box">
<b><asp:Label ID="Title" runat="server"></asp:Label></b>
<p><asp:Label ID="Description" runat="server"></asp:Label></p>
<ul>
</HeaderTemplate>
<ItemTemplate>
<li><asp:HyperLink ID="ArticleLink" runat="server" ></asp:HyperLink></li>
</ItemTemplate>
<FooterTemplate>
</ul>
</div>
</FooterTemplate>
</cms:CMSRepeater>
</ItemTemplate>
</cms:CMSRepeater>
The backend code is
protected void CategoryRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
RepeaterItem item = e.Item;
DataRowView dr = item.DataItem as DataRowView;
if ((item.ItemType == ListItemType.Item) || (item.ItemType == ListItemType.AlternatingItem))
{
CMSRepeater inner = ((CMSRepeater)item.FindControl("ArticleTypes"));
inner.ClassNames = dr["Doctype"].ToString();
inner.Path = "/%";
inner.TopN = 5;
inner.OrderBy = "Date DESC";
inner.DataBind();
inner.ReloadData(true);
if (inner != null)
{
inner.ItemDataBound += new RepeaterItemEventHandler(this.CategoryRepeaterInner_ItemDataBound);
}
}
}
void CategoryRepeaterInner_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
RepeaterItem item = e.Item;
DataRowView dr = item.DataItem as DataRowView;
if ((item.ItemType == ListItemType.Item) || (item.ItemType == ListItemType.AlternatingItem))
{
HyperLink ArticleLink = ((HyperLink)item.FindControl("ArticleLink")) as HyperLink;
ArticleLink.Text = dr["Title"].ToString();
ArticleLink.NavigateUrl = Functions.GetUrl(dr["NodeAliasPath"]);
}
}
its firing the first repeater and and finding the nested repeater in the itemdatabound and applies values to the properties but they do not seem to fire.
i have also tried on the front end of the nested repeater ClassNames='<%# Eval("Doctype")%>'
to get it to pull back that doctype
any ideas