Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have added three repeater inside with each other and then how to access Data Item parent Repeater in Child Repeater..
Posted

Something Like this:

XML
<HeaderTemplate>
    <%# ((RepeaterItem)Container.Parent.Parent).DataItem %>
</HeaderTemplate>
 
Share this answer
 
to get the repeater ( Rp2 ) it is inside (Rp1) to access the Rp2 items by :

for(int i=0;i<rp1.items.count;i++)>
{
Repeater Rp2= ((Repeater)Rp1.Items[i].FindControl("Rp2"));

//then loop Rp2

for(int j=0;j<rp2.items.count;j++)>
{
TextBox txtname = ((TextBox)Rp2.Items[j].FindControl("txtname")); // textbox inside repeater2
}

}
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900