ASP。net treeview xml

时间:2022-09-09 14:34:05
 this.TreeView2.ShowLines = false; //显示连接子节点与父节点之间的线条
TreeNodeBinding area = new TreeNodeBinding();
area.DataMember = "Area";
area.ValueField = "cAreaName";
this.TreeView2.DataBindings.Add(area); TreeNodeBinding province = new TreeNodeBinding();
province.DataMember = "Province";
province.ValueField = "cAreaName";
this.TreeView2.DataBindings.Add(province); TreeNodeBinding city = new TreeNodeBinding();
city.DataMember = "City";
city.ValueField = "cAreaName";
this.TreeView2.DataBindings.Add(city);