Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Nested Repeater

Thread Tools

Nested Repeater

Posts: n/a
I relatively new to ASP.Net, coming from a ColdFusion background. I'm trying
to create a report that does the following in a table:

url pass failed
url pass failed
url pass failed
url pass failed
url pass failed
url pass failed

I tried using 2 SQLDataSources and could only get one organization then all
the other data not sorted. I then tried the MicroSoft example, with some
variation, and that didn't work. The result above comes from a single table.
Here is the code I am using from the MS example:

<asp:Repeater ID="parentRepeater" runat="server">
<table border="1" cellpadding="3" cellspacing="0" summary="this table
for layout">
<td scope="col">Agency</td>
<strong><%# DataBinder.Eval(Container.DataItem, "agency")
<asp:Repeater ID="childRepeater" runat="server"
Container.DataItem.Row.GetChildRows("myrelation") %>'>
<td><%# DataBinder.Eval(Container.DataItem, "url") %></td>
<td><%# DataBinder.Eval(Container.DataItem, "filespass")
<td><%# DataBinder.Eval(Container.DataItem, "filesfailed")

Dim strConn1 As String =
ConfigurationManager.ConnectionStrings("accmon").C onnectionString
Dim MySQL1 As String = "SELECT DISTINCT agency FROM websites WHERE
webDelete = 0 AND webNew = 0"
Dim MyConn1 As New OleDbConnection(strConn1)
Dim cmd1 As New OleDbDataAdapter(MySQL1, MyConn1)
Dim ds As DataSet = New DataSet()
cmd1.Fill(ds, "websites")

'Create table for child repeater
Dim MySQL2 As String = "SELECT webID, url, files508, pass508,
failed508, verify508 FROM websites " & _
"WHERE webDelete = 0 AND webNew = 0"
Dim cmd2 As New OleDbDataAdapter(MySQL2, MyConn1)
cmd2.Fill(ds, "weburl")
ds.Relations.Add("myrelation", _
ds.Tables("websites").Columns("agency"), _
parentRepeater.DataSource = ds.Tables("websites")
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
repeater inside a repeater problem. uncensored ASP .Net 0 10-25-2006 06:10 PM
Repeater inside a Repeater Microsoft ASP .Net Web Controls 0 08-21-2006 09:13 AM
Repeater inside a ASP .Net 1 08-10-2005 01:58 PM
Repeater Using Javascript Referencing a Column in the Repeater ASP .Net 0 02-26-2005 05:02 PM
Repeater control with nested repeater ASP .Net 0 02-11-2005 05:10 PM