Access parent data in a nested strongly typed repeater
Well, from Accessing parent data in nested repeater, in the HeaderTemplate, I found the following solution. It's not the prettiest, but it works:
<%# ((Container.Parent.Parent as RepeaterItem).DataItem as A).Property2 %>
You could use a generic Tuple as type for the inner repeater, and pass on the Item from the outer repeater:
<asp:Repeater ItemType="A" runat="server" ID="Rpt">
<ItemTemplate>
<asp:Label Text="<%# Item.Property1 %>" runat="server" />
<asp:Repeater runat="server"
DataSource="<%# Item.Property3.Select(innerItem => new Tuple<A,B>(Item, innerItem)) %>"
ItemType="System.Tuple<A,B>">
<ItemTemplate>
<asp:Label Text="<%# Item.Item2.Property4 %>" runat="server" />
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:Repeater>
Be aware that ReSharper will protest against using generics in ItemType!
Here is a different example, closer to something I was working on:
<asp:Repeater runat="server" ID="RptWeekNumbers" ItemType="System.Int32">
<ItemTemplate>
<asp:Repeater runat="server"
DataSource="<%# Enumerable.Range(1, 5).Select(day => new Tuple<int,int>(Item, day))%>"
ItemType="System.Tuple<int,int>">
<ItemTemplate>
WeekNumber: <%# Item.Item1 %>,
DayNumber: <%# Item.Item2 %>
<br />
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:Repeater>