I have a Repeater inside a Repeater, how can a use the code below:
<input type="hidden" value='<%# Container.ItemIndex %>' />
pointing to the first repeater?
I have a Repeater inside a Repeater, how can a use the code below:
<input type="hidden" value='<%# Container.ItemIndex %>' />
pointing to the first repeater?
This question is similar; although it talks about accessing a property from the <HeaderTemplate>, it feels like it should work from the <ItemTemplate>.
So try <%# ((RepeaterItem)Container.Parent.Parent).ItemIndex %>
If this doesn't work, you may need more .Parents. Try attaching an ItemDataBound handler to the inner repeater temporarily, and use the fact that the RepeaterItemEventArgs Item property returns the same object as Container gives in the aspx. So basically evaluate e.Item.Parent, e.Item.Parent.Parent etc. until you find the one that is another RepeaterItem. Then use the same number of .Parents in your aspx.
From MSDN: How To Display Hierarchical Data by Using Nested Repeater Controls
The article is a few years old but the content is what you're looking for.