I use the demo of treeviewadv demo“data binding”
use two table get treeview ,but I failed ,
I use code as
this.MineFaceTable.Columns.Add("MineFaceID", typeof(int));
this.MineFaceTable.Columns.Add("MineFaceName", typeof(string));
this.MonitoringPointTable.Columns.Add("MonitoringPointID", typeof(decimal));
this.MonitoringPointTable.Columns.Add("MonitoringPointName", typeof(string));
this.MonitoringPointTable.Columns.Add("MineFaceID", typeof(int));
string MineFacesql = "Select MineFaceID,MineFaceName from MineFaceList";
SQLiteDataReader MineFaceobjReader = SQLiteHelper.GetReader(MineFacesql);
DataTable MineFaceTable = RockBurstDAL.SQLiteHelper.GetDataSet(MineFacesql).Tables[0];
string MonitoringPointsql = "Select MonitoringPointID,MonitoringPointName,MineFaceID from MonitoringPointList";
DataTable MonitoringPointTable = RockBurstDAL.SQLiteHelper.GetDataSet(MonitoringPointsql).Tables[0];
ChildRelation1 = new Syncfusion.Windows.Forms.Tools.DataRelation(MonitoringPointTable, "MonitoringPointName", "MineFaceID");
treeViewAdv1.DataRelations.Clear();
this.sfDataGrid1.DataSource = MineFaceTable;
this.sfDataGrid2.DataSource = MonitoringPointTable;
treeViewAdv1.DisplayMember = "MineFaceName";
treeViewAdv1.ParentMember = "MineFaceName";
treeViewAdv1.ChildMember = "MineFaceID";
treeViewAdv1.DataRelations.Add(ChildRelation1);
treeViewAdv1.DataSource = MineFaceTable;
the MonitoringPointName are all in every MineFaceName ,that is error。