Solved

How to access a repeater inside a repeater.

Posted on 2010-08-26
3
416 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

791 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