G
Guest
Hi,
I'm trying to bind a datarelation to a datagrid so that I'll show all the
columns from the first and second datatables that relate (parent/child).
The code below only shows the data from the master table? How do I include
the children? I'm having trouble find docs on this.
dst.Relations.Add("ArticleCompany", dst.Tables["Article"].Columns["CoId"],
dst.Tables["Company"].Columns["CoId"],false);
DataGrid1.DataSource = dst.Tables["Article"].DefaultView;
DataGrid1.DataMember = "ArticleCompany";
DataGrid1.DataBind();
I'm trying to bind a datarelation to a datagrid so that I'll show all the
columns from the first and second datatables that relate (parent/child).
The code below only shows the data from the master table? How do I include
the children? I'm having trouble find docs on this.
dst.Relations.Add("ArticleCompany", dst.Tables["Article"].Columns["CoId"],
dst.Tables["Company"].Columns["CoId"],false);
DataGrid1.DataSource = dst.Tables["Article"].DefaultView;
DataGrid1.DataMember = "ArticleCompany";
DataGrid1.DataBind();