Nested Repeater Help

T

Tommy

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>
 
S

Scott Allen

HI Tommy:

Can you describe how you are setting the DataSource for the nested
repeater? Do you catch the ItemDataBound event for the rptParent
object?
 
T

Tommy

I am trying to set it in the load of the page.


Scott Allen said:
HI Tommy:

Can you describe how you are setting the DataSource for the nested
repeater? Do you catch the ItemDataBound event for the rptParent
object?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top