Nested Repeater Help

From: Tommy (tmartin_at_nospam_tlmartin.com)
Date: 11/06/04


Date: Sat, 6 Nov 2004 17:38:07 -0600

I have been working on getting nested repeaters to work for several days.
When I add a repeater inside my item template i cannot see it in my code and
can't set the datasource for it, etc, thus it's useless.

Anytime i try to reference rptChild I get an error saying that it's not an
object. If I set a break point I see that it's <nothing>.

Here is a sample of code that shows the problem.

I would REALLY appreciate any help on getting this to work. They must be
contained inside cells of another table to make the data look like the
customer wants.

Thanks VERY much.

Tommy

<form id="Form1" method="post" runat="server">
 <asp:Repeater id="rptParent" runat="server">
  <HeaderTemplate>
   <table>
  </HeaderTemplate>
  <ItemTemplate>
   <tr>
    <td></td>
   <tr>
    <td>
     label1
    </td>
    <td>
     <asp:Repeater id="rptChild" runat="server"> <--- this
repeater is not visible at all
      <ItemTemplate>
       print something here
      </ItemTemplate>
     </asp:Repeater>
    </td>
   </tr>
   </td></tr>
  </ItemTemplate>
  <FooterTemplate>
   </table>
  </FooterTemplate>
 </asp:Repeater>
</form>



Relevant Pages

  • RE: Repeater question
    ... As for the problem on dynamically using different template depend on the ... datasource item's value in repeater control, based on my experience, the ... buildin asp.net template databound controls (repeater, ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • RE: Repeater question
    ... | As for the problem on dynamically using different template depend on the ... | datasource item's value in repeater control, based on my experience, the ... | buildin asp.net template databound controls ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: Repeater Control : Can it work with different data sources?
    ... The repeater, as a control, is made up of templates for rows of data (and ... every second row) and then a header and footer template. ... The norm, when creating a table, is to put the and all header tags ...
    (microsoft.public.dotnet.framework.aspnet)
  • Repeater Control - ItemCommand Event
    ... kann man in dem Item Template ... in einem Repeater Control soetwas wie ein LinkButton ... Repeater - Listen einen ImageButton in dem Item ...
    (microsoft.public.de.inetserver.iis.asp)
  • Re: Reference repeater data
    ... it from Repeater's ItemDataBound event in addition to the template itself ... However, if you bind the Repeater say to a DataTable or a DataSet, you could ... Repeater is then just one consumer for the ...
    (microsoft.public.dotnet.framework.aspnet)