orangelight
Technical User
Hi
can some one give me an example or know of an example of a nested repeater
thanks
Hesh
can some one give me an example or know of an example of a nested repeater
thanks
Hesh
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<asp:Repeater id="TopRepeater" runat="server"
DataSourceId="MyDataSource">
<HeaderTemplate>...</HeaderTemplate>
<ItemTemplate>
//standard controls and stuff
<asp:Repeater
id="NestedRepeater"
runat="server"
DataSource='<%#Eval("MyEnumeratedProperty") %>'>
<HeaderTemplate>...</HeaderTemplate>
<ItemTemplate>...</ItemTemplate>
<FooterTemplate>...</FooterTemplate>
<asp:Repeater>
<ItemTemplate>
<FooterTemplate>...</FooterTemplate>
</asp:Repeater>
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Create the connection and DataAdapter for the Authors table.
Dim connstring As String
Dim cnn As SqlConnection
connstring = ConfigurationSettings.AppSettings("ConnectionString")
cnn = New SqlConnection(connstring)
Dim cmd1 As New SqlDataAdapter("select [list fields here not *. it's good practice] from tble_content", cnn)
''Create and fill the DataSet.
Dim ds As New DataSet()
cmd1.Fill(ds, "content_name")
'Create a second DataAdapter for the Titles table.
Dim cmd2 As New SqlDataAdapter("select content_subnav, content_name, content_no_id from view_aspx_subnav", cnn)
cmd2.Fill(ds, "content_names")
''close connection
cnn.Close()
'Create the relation bewtween the Authors and Titles tables.
ds.Relations.Add("myrelation", ds.Tables("content_name").Columns("content_no_id"), ds.Tables("content_names").Columns("content_no_id"))
'Bind the Authors table to the parent Repeater control, and call DataBind.
parent1.DataSource = ds
parent1.DataMember = ds.Tables("content_name")
parent1.DataBind()
End Sub