473,779 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

nested repeaters

Is it possible to have nested repeaters three layers deep

I have gotten it to work with only two, and when I tried to get the third layer to work
COD
<asp:repeater id="rep" runat="server"> <ItemTemplate>< span style="BACKGROU ND-COLOR: silver"><%# DataBinder.Eval (Container.Data Item, "CustomerID ") %>&nbsp
<%# DataBinder.Eval (Container.Data Item, "CompanyNam e") %></span><br /><asp:repeate r id="childRepeat er" runat="server" datasource='<%# ((DataRowView)C ontainer.DataIt em
.Row.GetChildRo ws("relation") %>' ><itemtemplate> &nbsp;&nbsp;&nb sp;<%# DataBinder.Eval (Container.Data Item, "[\"OrderID\"]") %>&nbsp;&nbsp;& nbsp;&nbsp;
&nbsp;&nbsp;&nb sp;<%# DataBinder.Eval (Container.Data Item, "[\"OrderDate\ "]") %><br /><asp:repeate r id="Repeater1" runat="server" datasource='<%# ((DataRowView)C ontainer.DataIt em
.Row.GetChildRo ws("orderrel") %>' ><itemtemplate> &nbsp;&nbsp;&nb sp;<%# DataBinder.Eval (Container.Data Item, "[\"ProductID\ "]") %>&nbsp;&nbsp;& nbsp;&nbsp;
&nbsp;&nbsp;&nb sp;<%# DataBinder.Eval (Container.Data Item, "[\"UnitPrice\ "]") %><br /></itemtemplate></asp:repeater></itemtemplate></asp:repeater></ItemTemplate></asp:repeater

/COD

I got this error on the datasource line
Specified cast not vali
COD

<asp:repeater id="Repeater1" runat="server" datasource='<%# ((DataRowView)C ontainer.DataIt em).Row.GetChil dRows("orderrel ") %>'

/COD

By the way, all of this is built against the Northwind database for testing purposes. I can post my codebehind for all of the relations if you want. However, I checked it by commenting out the top layer of relations and only using the bottom two repeaters with orders and order details, and it works fine

-Thanks

Nov 18 '05 #1
0 1269

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

Similar topics

3
14728
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
0
1539
by: Machi | last post by:
let say in parent-child scenerio (Product: Product Category - one product category may has many products), i am using nested repeaters where parent repeater will be used to display info and child repeater will be used to display info, i define the parent and child repeaters once in HTML tag, and create the repeaters for different categories and products repeaters (instances of Repeater) dynamically in Code-Behind using C#, however, when i view...
2
1760
by: Matt Jensen | last post by:
Howdy I have 2 repeaters on a C# page, 1 nested under the other. In some cases, the nested repeaters <ItemTemplate> does not contain rows - how does one display a text message in place of the empty rows eg. "No events for this month"? Thanks Matt
1
1369
by: mavrick_101 | last post by:
Hi, I have nested repeaters. But the page breaks if I refresh 2 or 3 times. It breaks with the following error message.. "Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. " I am using the following lines for loading data in the child repeaters on Item_DataBound of Parent Repeater.
4
4571
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...
2
4952
by: Josh | last post by:
I have a nested repeater situation with a Link Button on the nested repeater. However when the link button is clicked I get a postback but the event never takes place. I'm trying to wire up the nested repeaters ItemCommand event in the ItemDataBound of the outer repeater. I have even tried sharing the Outer repeaters ItemCommand event but it still does not fire. I'm missing a trick here, can you tell me what it is?
1
4332
PrinsonG
by: PrinsonG | last post by:
My Query is How do I export to excel/csv using Nested Repeaters. My project is web-based and i am using C#.Net. In this i use three repeaters. one displays ID, Name of the user. second displays break details. third displays total time spent.
1
1872
by: andrew.douglas11 | last post by:
Hello all, Is it possible to share controls inside a child repeater? Here's the situation: I have a web page that needs to display data grouped by A, and alternatively by B (only one grouping displayed at a time through Panel.Visible). A and B both share common child data: C. I have 2 parent repeaters corresponding to A and B, and each of those repeaters have 1 child repeater containing child data C. Presently, my code handles...
3
9466
by: Leon Mayne | last post by:
If I have a datatable which looks like this: Record Id, Group Id, Name 1, 1, Test 1 2, 1, Test 2 3, 2, Test 3 4, 3, Test 4 Is it possible to use nested repeaters to group the information by GroupId? e.g. displaying something like
0
9636
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
10306
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, 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...
1
10074
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
9930
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...
0
8961
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6724
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();...
0
5503
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3632
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2869
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.