C
Cdudej
Is the a way that is can do this but through 3 table
I have User - Statuslink - Status i need to link these together then i
want to add them to the treeview.
ds.Relations.Add("AuthorTitle",
ds.Tables["Authors"].Columns["au_id"],
ds.Tables["Titles"].Columns["au_id"]);
//Populate the TreeView from the DataSet.
foreach (DataRow rowAuthor in ds.Tables["Authors"].Rows)
{
nodeAuthor = new TreeNode();
nodeAuthor.Text = rowAuthor["au_lname"] + ", "
+ rowAuthor["au_fname"];
TreeView1.Nodes.Add(nodeAuthor);
foreach (DataRow rowTitle in
rowAuthor.GetChildRows("AuthorTitle"))
{
nodeTitle = new TreeNode();
nodeTitle.Text = rowTitle["Title"].ToString();
nodeAuthor.Nodes.Add(nodeTitle);
}
I have User - Statuslink - Status i need to link these together then i
want to add them to the treeview.
ds.Relations.Add("AuthorTitle",
ds.Tables["Authors"].Columns["au_id"],
ds.Tables["Titles"].Columns["au_id"]);
//Populate the TreeView from the DataSet.
foreach (DataRow rowAuthor in ds.Tables["Authors"].Rows)
{
nodeAuthor = new TreeNode();
nodeAuthor.Text = rowAuthor["au_lname"] + ", "
+ rowAuthor["au_fname"];
TreeView1.Nodes.Add(nodeAuthor);
foreach (DataRow rowTitle in
rowAuthor.GetChildRows("AuthorTitle"))
{
nodeTitle = new TreeNode();
nodeTitle.Text = rowTitle["Title"].ToString();
nodeAuthor.Nodes.Add(nodeTitle);
}