473,386 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Nested Repeater Help

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>
Jul 21 '05 #1
3 2682
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?

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Sat, 6 Nov 2004 17:38:07 -0600, "Tommy"
<tmartin@nospam_tlmartin.com> wrote:
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>


Jul 21 '05 #2
I am trying to set it in the load of the page.
"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:db********************************@4ax.com...
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?

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Sat, 6 Nov 2004 17:38:07 -0600, "Tommy"
<tmartin@nospam_tlmartin.com> wrote:
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>

Jul 21 '05 #3

Tommy:

Try binding when the parent data binds. Very similar to this article
where I do the same thing with a nested drop down list:
http://odetocode.com/Articles/231.aspx.

--
Scott
http://www.OdeToCode.com/blogs/scott/
On Sat, 6 Nov 2004 18:19:25 -0600, "Tommy"
<tmartin@nospam_tlmartin.com> wrote:
I am trying to set it in the load of the page.
"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:db********************************@4ax.com.. .
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?

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Sat, 6 Nov 2004 17:38:07 -0600, "Tommy"
<tmartin@nospam_tlmartin.com> wrote:
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>


Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: mark | last post by:
My problem is I need to have a "nested" repeater. I have an array which I load into a hashtable - that part works great. I can setup the second repeater to work just fine, as long as it's not...
3
by: DonRex | last post by:
Hello all! I couldn't find a web application-newsgroup for ASP.NET, so I'm sorry if this is the wrong forum! Synopsis: In my webform I have 3 nested repeaters: rpWeeks ----- rpTime
1
by: Bojesphob | last post by:
Can someone help? I have a nested repeater in which I wish to format one of the bits of data in currency. I know that the code for the regular repeater (which works fine in parent) is...
0
by: Ed Allan | last post by:
http://ejaconsulting.com/nestedrepeater/NestedRepeater.txt >-----Original Message----- >Doh! The HTML has all been rendered . . . > >Right click on this link and select 'Save target as ..' >to...
3
by: Tommy | last post by:
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...
3
by: sorCrer | last post by:
Hi All, Posted after extensive searching! I have a nested repeater control as follows: (Simplified ;-)) <table> <asp:repeater id=parent onItemDataBound=createChild> <tr><td>Level...
1
by: humbleFunGuy | last post by:
What does nested controls mean in .Net? Any help is appreciated. Thanks, fanzi
2
by: mark | last post by:
(not sure if this is the correct group) My problem is I need to have a "nested" repeater. I have an array which I load into a hashtable - that part works great. I can setup the second repeater...
4
by: =?Utf-8?B?SmFtZXMgR2V1cnRz?= | last post by:
On my page, I have one repeater that contains a literal control and a nested repeater. The nested repeater contains a literal control. Both repeaters are databound with only one object (string). ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.