Solved

How to access a repeater inside a repeater.

Posted on 2010-08-26
3
417 Views
Last Modified: 2012-05-10
I have a repeater inside a repeater:

<asp:Repeater id="RepeaterA" runat="server">
  <ItemTemplate>
    <p>
      <%# DataBinder.Eval(Container.DataItem, "Field1") %>
    </p>
    <asp:Repeater ID="RepeaterB" datasource='<%# ((DataRowView)Container.DataItem).Row.GetChildRows("Relation") %>' runat="server">
      <ItemTemplate>
        <asp:CheckBox ID="CheckBox" runat="server" Text="" />
      </ItemTemplate>
    </asp:Repeater>
  </ItemTemplate>
</asp:Repeater>

How can I access the control CheckBox? I only see RepeaterA from my C# code.

Kevin
0
Comment
Question by:zorvek (Kevin Jones)
  • 2
3 Comments
 
LVL 81

Author Comment

by:zorvek (Kevin Jones)
ID: 33536334
Also, I need to get the total count of CheckBox controls...or at least figure out how to index through the complete list.

Kevin
0
 
LVL 16

Accepted Solution

by:
Stephan earned 500 total points
ID: 33536731
You can use the itemdatabound event for looking in each dataitem within repeaterA and then for repeaterB
0
 
LVL 16

Expert Comment

by:Stephan
ID: 33536735
RepeaterB is not availiable because it is generated by databound, that's why you can not see it through intellisense
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question