Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Question on asp.net nested repeater
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Question on asp.net nested repeater

 Post Reply Post Reply
Author
szdev View Drop Down
Newbie
Newbie


Joined: 07 September 2007
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote szdev Quote  Post ReplyReply Direct Link To This Post Topic: Question on asp.net nested repeater
    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:
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
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.