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> 3 2710
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>
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>
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> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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...
|
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
|
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:...
|
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
>
|
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...
| |
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>
|
by: humbleFunGuy |
last post by:
What does nested controls mean in .Net? Any help is appreciated.
Thanks,
fanzi
|
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,...
|
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...
|
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...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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...
|
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,...
|
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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |