I am trying to nest repeaters and I also want unlimited levels.
Basically the table layout is:
ID PID Title
--------------------------
1 0 Main title 1
2 0 Main title 2
3 1 Sub title 1
Here is the code
Rdr = New SqlDataAdapter("SELECT id, pid, navTitle, pageTitle FROM
NAVIGATION WHERE pid = 0 ORDER BY sortOrder ASC", Conn)
RdrSet = New DataSet
Rdr.Fill(RdrSet, "Navigation")
RdrSet.Relations.Add("myrelation", _
RdrSet.Tables("Navigation").Columns("id"), _
RdrSet.Tables("Navigation").Columns("pid"))
nav.datasource = RdrSet
nav.DataBind()
---------------------
<asp:Repeater id="nav" runat="server">
<ItemTemplate>
<%# NavTxt(Container.DataItem) %>
<asp:Repeater id="subNav" runat="server" datasource='<%#
Container.DataItem.Row.GetChildRows("myrelation") %>'>
<ItemTemplate>
<%# NavTxt(Container.DataItem) %>
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:Repeater>
Am I even going in the right direction? The added problem is that I
need to go more than 2 levels.
------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a
href="http://us.ard.yahoo.com/SIG=12hc3bj21/M=362329.6886308.7839368.1510227/D=groups/S=1705006764:TM/Y=YAHOO/EXP=1124138468/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</a>.</font>
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/