Hello! I'm new to .NET programming and ..please.. I want some help with a probelm I have.
I have 1 dataset with 2 tables in it, filled with some results. f.e. the DataSet1:
People: P_ID, Name, SurName
Logs: L_ID, log, time, parent_P_ID
I want a repeater (Repeater_1) to show the results of table People, and inside Repeater_1 another repeater (Repeater_2) to show the Logs with P_ID == parent_P_ID.
Thanks for your time!!!I havent try this before, but let's see, you can try this
in html code:
<asp:Repeater ID="Repeater1" Runat="Server">
<itemtemplate>
...your table code
<asp:Repeater ID="Repeater2" Runat="Server">
<itemtemplate>
..your table code
</itemtemplate>
</asp:Repeater>
</itemtemplate>
</asp:Repeater>
in vb code:
Repeater1.DataSoure = DataSet.Tables("People")
Repeater1.DataBind()
Dim i as integer
For i = 0 to Repeater1.Items.Count - 1
Dim Rptr as Repeater = Repeater1.Items(i).FindControl("Repeater2")
Rptr.DataSource = DataSet.Tables("Logs")
Rptr.DataBind()
Next
Hope this helps
I have 1 dataset with 2 tables in it, filled with some results. f.e. the DataSet1:
People: P_ID, Name, SurName
Logs: L_ID, log, time, parent_P_ID
I want a repeater (Repeater_1) to show the results of table People, and inside Repeater_1 another repeater (Repeater_2) to show the Logs with P_ID == parent_P_ID.
Thanks for your time!!!I havent try this before, but let's see, you can try this
in html code:
<asp:Repeater ID="Repeater1" Runat="Server">
<itemtemplate>
...your table code
<asp:Repeater ID="Repeater2" Runat="Server">
<itemtemplate>
..your table code
</itemtemplate>
</asp:Repeater>
</itemtemplate>
</asp:Repeater>
in vb code:
Repeater1.DataSoure = DataSet.Tables("People")
Repeater1.DataBind()
Dim i as integer
For i = 0 to Repeater1.Items.Count - 1
Dim Rptr as Repeater = Repeater1.Items(i).FindControl("Repeater2")
Rptr.DataSource = DataSet.Tables("Logs")
Rptr.DataBind()
Next
Hope this helps