I have a nested repeater which I am trying to get scores to display in the 3rd repeater to match up with the categories and usernames in the other repeaters. I am unsure how to get the data in the other repeaters to match up and display in the correct columns in the 3rd repeater.
Here is my code. Any assistance is greatly appreciated. I am new to asp.net. I have really been spinning my wheels trying to figure this out.
Code:
<table>
<tr><td>Category</td>
<asp:Repeater ID="RepeaterNames" runat="server" DataSourceID="SqlUserNames">
<ItemTemplate> <td><%#DataBinder.Eval(Container.DataItem, "FirstName")%> <%#DataBinder.Eval(Container.DataItem, "LastName")%>
</td>
</ItemTemplate>
</asp:Repeater>
<td>Average</td>
</tr>
<asp:Repeater ID="RepeaterAreas" runat="server" DataSourceID="SqlAssessmentAreas">
<itemtemplate>
<tr>
<td><%#DataBinder.Eval(Container.DataItem, "AreaName")%></td>
<asp:Repeater ID="RepeaterScores" runat="server" DataSourceID="SqlUserScores" OnItemDataBound="repeaterScores_ItemDataBound">
<ItemTemplate>
<td>
<table>
<tr>
<td> This is where the scores should appear associate with the user name and category
</td>
</tr>
</table>
</td>
</ItemTemplate>
</asp:Repeater>
</tr>
</table>
VB.Net Code:
Original - VB.Net Code |
| < name= rows=10 cols=80>Public Sub repeaterScores_ItemDataBound(ByVal sender As Object, ByVal e As RepeaterItemEventArgs)
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then
Dim RepeaterNames As Repeater = CType(e.Item.FindControl("RepeaterNames"), Repeater)
Dim RepeaterScores As Repeater = CType(e.Item.FindControl("RepeaterScores"), Repeater)
Dim s As SqlDataSource = CType(e.Item.FindControl("SqlUserScores"), SqlDataSource)
‘’Response.Write(DataBinder.Eval(e.Item.DataItem, "FirstName").ToString() + "<br>")
'' Response.Write(DataBinder.Eval(e.Item.DataItem, "ColAvg1").ToString())> | |
Public Sub repeaterScores_ItemDataBound(ByVal sender As Object, ByVal e As RepeaterItemEventArgs)
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then
Dim RepeaterNames As Repeater = CType(e.Item.FindControl("RepeaterNames"), Repeater)
Dim RepeaterScores As Repeater = CType(e.Item.FindControl("RepeaterScores"), Repeater)
Dim s As SqlDataSource = CType(e.Item.FindControl