SignUp UR = new SignUp(); DataSet ds = UR.GetAllRegisterations(); // ds.Relations.Add("Cat_Product", ds.Tables["Categories"].Columns["CategoryID"], ds.Tables["Products"].Columns["CategoryID"]); ds.Relations.Add("Note", ds.Tables["SR"].Columns["SR_ID"], ds.Tables["SE"].Columns["SR_ID"]); TreeNode tn ; foreach(DataRow dr in ds.Tables["SR"].Rows) { tn = new TreeNode(dr["SR_ID"].ToString()); foreach (DataRow drChild in dr.GetChildRows("SE_ID")) { tn.Nodes.Add(drChild["SR_ID"].ToString()); } treeView1.Nodes.Add(tn); TreeView1.Nodes.Add(tn); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)