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 loop:
Dim arrRepeater As New ArrayList()
'Repeat this part for each row
x = 0
Do Until x = db_fieldnamemax
Dim htRepeater As New Hashtable()
htRepeater.Add( "ColName1", db_fieldname(x, 1))
htRepeater.Add( "ColName2", db_fieldname(x, 2))
arrRepeater.Add (htRepeater)
x += 1
Loop
Repeater1.DataS ource = arrRepeater
Repeater1.DataB ind()
Dim arrRepeater2 As New ArrayList()
'Repeat this part for each row
x = 0
Do Until x = db_fieldproduct max
Dim htRepeater As New Hashtable()
htRepeater.Add( "ColProduct 1", db_fieldproduct (x, 1))
htRepeater.Add( "ColProduct 2", db_fieldproduct (x, 2))
arrRepeater.Add (htRepeater)
x += 1
Loop
Repeater2.DataS ource = arrRepeater2
Repeater2.DataB ind()
Would someone please point me in the right direction on how to use a
nested repeater??
Here is my frontside code (where I think the problem is):
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate >
First item: <%#Container.Da taItem("ColName 1")%>
Second item: <%#Container.Da taItem("ColName 2")%>
<asp:Repeater ID="Repeater2" runat="server">
<ItemTemplate >
*** Nested item 1: <%#Container.Da taItem("ColProd uct1")%>
*** Nested item 2: <%#Container.Da taItem("ColProd uct2")%>
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:Repeater>
Also, the "Repeater2" shows undefined (in the code behind), unless we add
the following
statement in the code behind:
Partial Class MainPage
Inherits System.Web.UI.P age
Dim Repeater2 As New System.Web.UI.W ebControls.Repe ater()
-Mark 0 1768 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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: 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: Stephen Miller |
last post by:
I am using the OnItemDataBound event of Repeater control to nest a
DataGrid within the Repeater. When I attempt to bind to the DataGrid
using the DataSource method I get the error message "Object reference
not set to an instance of an object". This error message commonly
occurs when a server control is incorrecly declared, so naturally I
have double checked this.
To test this, I moved the aspx code for the DataGrid
('myNestedDataGrid')...
|
by: Colin Nicholls |
last post by:
Platform: ASP.NET 1.1
I have a repeater nested inside another repeater. My outer repeater is
looping fine. I am manually binding the inner repeater to a DataReader
obtained from another function.
My objects aren't null, my ItemDataBound() method is being called, and as
you can see I have verified that I have data.
Yet, the repeater does not appear in the final HTML, and what's more, after
| |
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: 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: jazzart |
last post by:
Hi there,
I'm fairly new to programming with Asp.Net 2.0 so I'm finding myself
regularly fumbling around in the dark a bit, so to speak.
I'm currently using Visual Web Developer and have been following the
www.asp.net data access tutorials to create a DAL and BLL to connect
my web site (a simple real estate property search web site) to my
database (Sql Express 2005).
|
by: ASF |
last post by:
Hey all,
I have a gridview which pulls from a BLL which pulls from a DAL
(an .XSD file). Each row on that gridview has a nested repeater which
pulls from another table. The code which populates each nested
repeater is shown below (it's in the gridview's RowDataBound event).
My question is this: what can I do to speed up this process? Currently
EVERY time a new gridview row is generated the code reaches out to the
database, grabs the...
|
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: 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...
| |
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: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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.
| |
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...
| |