The relation is set up in the dataset.
something like
_myDataSet.Relations.Add("Users_Results", _myDataSet.TableA.UsersNameColumn,
_myDataSet.TableB.UsersNameColumn);
where _myDataSet is your strongly typed DataSet.
in your nested Repeater you would then do something like this:
<asp:repeater id="_reportoutput" Runat="server">
....templates
//nested repeater
<asp:repeater id="_nextstuff" Runat="server" DataSource='<%#
GetChildRelation(Container.DataItem,"Users_Results ")%>'>
with the following in your code behind:
public static DataView GetChildRelation(object dataItem, string relation)
{
DataRowView drv = dataItem as DataRowView;
if (drv != null)
return drv.CreateChildView(relation);
else
return null;
}
MattC
"Duncan Welch" <du**@ntpcl.f9.co.uk> wrote in message
news:us*************@TK2MSFTNGP10.phx.gbl...
Thanks for your reply; I saw this example on the web, but I'm unsure where
the ItemDetailDataRelation comes from. I tried all the relationship names
that were in the strongly-typed dataset designer, but they gave an error.
I got the impression that if you were doing it between two datatables,
that
would be the name of the Relations.Add(... but I couldn't seem to create a
programatic relationship between two fields in a strongly typed dataset.
Duncan
"bfking" <bf****@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com... assign the "Items" table to the outter repeater, then in the
OnItemDataBound event handler:
switch (e.Item.ItemType){
case ListItemType.Item: case ListItemType.AlternatingItem:
Repeater ir = e.Item.FindControl("rptInnerRepeater")
ir.DataSource =
((DataRowView)e.Item.DataItem).CreateChildView("It emDetailDataRelation");
ir.DataBind();
}
hope that helps