Print Page | Close Window

Question on asp.net nested repeater

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: ASP.NET Discussion
Forum Description: Discussion and chat on ASP.NET related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=24364
Printed Date: 29 March 2026 at 3:41pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Question on asp.net nested repeater
Posted By: szdev
Subject: Question on asp.net nested repeater
Date Posted: 07 September 2007 at 3:29pm
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:
http://forums.aspfree.com/net-development-11/repeater--help-please-186599.html#top"> 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())
  1.  
  2. Public Sub repeaterScores_ItemDataBound(ByVal sender As Object, ByVal e As RepeaterItemEventArgs)
  3.  
  4.      If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then
  5.         Dim RepeaterNames As Repeater = CType(e.Item.FindControl("RepeaterNames"), Repeater)
  6.  
  7. Dim RepeaterScores As Repeater = CType(e.Item.FindControl("RepeaterScores"), Repeater)
  8.  
  9.             Dim s As SqlDataSource = CType(e.Item.FindControl



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net