Hello,
I am generating a treeView from 3 SQL Server tables.
I added the binding sources, table adapter ....
I write this code:
// TODO: This line of code loads data into the 'logisticsDataSet.Region_1' table. You can move, or remove it, as needed.
this.region_1TableAdapter.Fill(this.logisticsDataSet.Region_1);
this.radTreeView1.RelationBindings.Add(new RelationBinding("FK_Reg_1_Cont", this.Region1bindingSource)); this.radTreeView1.RelationBindings.Add(new RelationBinding("FK_Reg_2_Reg_1", this.Region2bindingSource));this.radTreeView1.RelationBindings.Add(new RelationBinding("FK_Emp_Reg_2", this.Region2bindingSource));
I am generating a treeView from 3 SQL Server tables.
I added the binding sources, table adapter ....
I write this code:
this.villeTableAdapter.Fill(this.logisticsDataSet.Ville);
// TODO: This line of code loads data into the 'logisticsDataSet.Region_2' table. You can move, or remove it, as needed.
this.region_2TableAdapter.Fill(this.logisticsDataSet.Region_2);
// TODO: This line of code loads data into the 'logisticsDataSet.Region_1' table. You can move, or remove it, as needed.
this.region_1TableAdapter.Fill(this.logisticsDataSet.Region_1);
// TODO: This line of code loads data into the 'logisticsDataSet.Pays' table. You can move, or remove it, as needed.
this.paysTableAdapter.Fill(this.logisticsDataSet.Pays);
this.radTreeView1.RelationBindings.Add(new RelationBinding("FK_Reg_1_Cont", this.Region1bindingSource)); this.radTreeView1.RelationBindings.Add(new RelationBinding("FK_Reg_2_Reg_1", this.Region2bindingSource));this.radTreeView1.RelationBindings.Add(new RelationBinding("FK_Emp_Reg_2", this.Region2bindingSource));
this.radTreeView1.RootRelationDisplayName = "Cont";
this.radTreeView1.DataSource = this.paysBindingSource;
Now my treeView is correctly populated.
My problem is how the change the text displayed in the treeNode because i want that the treeView another column name (and in the future i want to customize the text displayed in the treeNode) ?
Thanks in advance.