473,383 Members | 1,863 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,383 software developers and data experts.

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="BACKGROUND-COLOR: silver"><%# DataBinder.Eval(Container.DataItem, "CustomerID") %>&nbsp
<%# DataBinder.Eval(Container.DataItem, "CompanyName") %></span><br /><asp:repeater id="childRepeater" runat="server" datasource='<%# ((DataRowView)Container.DataItem
.Row.GetChildRows("relation") %>' ><itemtemplate>&nbsp;&nbsp;&nbsp;<%# DataBinder.Eval(Container.DataItem, "[\"OrderID\"]") %>&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;<%# DataBinder.Eval(Container.DataItem, "[\"OrderDate\"]") %><br /><asp:repeater id="Repeater1" runat="server" datasource='<%# ((DataRowView)Container.DataItem
.Row.GetChildRows("orderrel") %>' ><itemtemplate>&nbsp;&nbsp;&nbsp;<%# DataBinder.Eval(Container.DataItem, "[\"ProductID\"]") %>&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;<%# DataBinder.Eval(Container.DataItem, "[\"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)Container.DataItem).Row.GetChildRows ("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 1245

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

Similar topics

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
0
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...
2
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...
1
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...
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). ...
2
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...
1
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...
1
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...
3
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.