I have a list of objects that I want to display in a particular way, and am having way more trouble than I was expecting. Essentially I need a setup as follows:
- Parent Level 2 (header)
- Child Level 3 items in a table
This repeats until the end of the list that gets pulled on each pageload. I've taken a try at nested repeaters but failed.
<asp:Repeater runat="server" ID="parentMeetingRepeater" >
<ItemTemplate>
<h5><%# GetParentMeetingName(Eval("Id")) %></h5>
<hr />
<asp:Repeater runat="server" ID="childMeetingRepeater" >
<HeaderTemplate>
<table style="width: 100%;">
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<a href="/Display.aspx?ccbid=<%# Eval("Id")%>"><%# Eval("Name") %></a>
</td>
<td>
<%# Eval("Description") %>
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
</ItemTemplate>
There was an event on the parent repeater to databind the 2nd repeater, but I quickly realized theres no logic to tell it to only display level 3 items with a parent of the level2 id. Any ideas how I might be able to attack this? I'm thinking nested repeaters might be the wrong direction. - Thanks