473,614 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2704
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.c om...
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
1756
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 nested within the first repeater. If it is nested within the first repeater, I don't get any data. If I put the second repeater as a separate repeater, not nested, it works fine. Here's my actual code, showing data pulled from the array within a...
3
14714
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
3152
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 databinder.eval(Container.DataItem, "Net", "{0:c}") . BUT I use that code in the nested repeater and IT DOES NOT WORK!!!! In that code I have DataBinder.Eval (Container.DataItem, "Reduction", "{0:c}") and the page gives me the error "Error:...
0
5395
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 get the code in a text file. > >Thanks - Ed >
3
1359
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 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...
3
4413
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</td></tr> <asp:repeater id=child>
1
1298
by: humbleFunGuy | last post by:
What does nested controls mean in .Net? Any help is appreciated. Thanks, fanzi
2
1903
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 to work just fine, as long as it's not nested within the first repeater. If it is nested within the first repeater, I don't get any data. If I put the second repeater as a separate repeater, not nested, it works fine. Here's my actual code,...
4
4556
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). But... and this is the crappy part, the nested repeater's events are fired twice. How do I know this? I setup global private counter variables that get incremented on the repeater's ItemDataBound event. The outer repeater is correct and only...
0
8182
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8579
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8279
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8433
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6088
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4127
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2568
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1747
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1425
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.