Binding TreeView to DataSet
问题 I have a dataset I created from a Oracle Query. I get a datatable from a function and add it to dataset. now I try to bind to treeview to the ds. My code Behind: private void init_TreeView() { //TreeViewItem parent = PM_TreeView.Items.Add("Requirements"); DataTable dt = DataBases.RunQuery(); dt.TableName = "REQ"; DataSet ds = new DataSet(); ds.Tables.Add(dt); //ds.Relations.Add("rsParentChild", ds.Tables["REQ"].Columns["RQ_REQ_ID"], ds.Tables["REQ"].Columns["RQ_FATHER_ID"]); var dataSet = ds;