protected void ASPxButton1_Click(object sender, EventArgs e) { ASPxTreeList1.Columns.Clear(); //tl.Columns[0].Caption = "Customer"; TreeView1.Nodes.Clear(); int rschId; if (ASPxComboBox1.SelectedItem.Text != "") { //ASPxTreeList1.BeginUpdate(); //ASPxTreeList1.Columns.Add(); //tl.Columns[0].Caption = "Customer"; //tl.Columns[0].VisibleIndex = 0; //tl.Columns.Add(); //tl.Columns[1].Caption = "Location"; //tl.Columns[1].VisibleIndex = 1; //tl.Columns.Add(); //tl.Columns[2].Caption = "Phone"; //tl.Columns[2].VisibleIndex = 2; //tl.EndUpdate(); ASPxTreeList1.Columns.Add(new DevExpress.Web.ASPxTreeList.TreeListDataColumn("KeyName", "Имя ключя")); ASPxTreeList1.Columns.Add(new DevExpress.Web.ASPxTreeList.TreeListDataColumn("IsNodeInRsch", Rs.ResearchName)); ASPxTreeList1.Columns.Add(new DevExpress.Web.ASPxTreeList.TreeListDataColumn("IsMoneInCompared", ASPxComboBox1.SelectedItem.Text)); //var r = CreateNodeCore( "test root","1", "2", null); //CreateNodeCore("child", "2", "1", r); //CreateNodeCore("test root2", "3", "3", null); //ASPxTreeList1.AppendNode(1,new { IsNodeInRsch = "1", IsMoneInCompared = "2" }, null); //ASPxLabel3.Text = ASPxComboBox1.SelectedItem.Text; //LComparePie.Text = ASPxComboBox1.SelectedItem.Text; } //rschId = (int)ASPxComboBox1.SelectedItem.Value; Int32.TryParse((string)ASPxComboBox1.SelectedItem.Value, out rschId); CompareTrees ct = new CompareTrees(); try { ASPxTreeList1.ClearNodes(); var nodes = ct.GetRschTree(Rs.Id, rschId); for (int i = 0; i < nodes.Nodes.Count; i++) //TreeNode tn in nodes.Nodes) TreeView1.Nodes.Add(nodes.Nodes[i]); TreeView1.Nodes[0].Text = "Сравнение ветвей реестра"; ConvertTreeViewToTreeList(TreeView1.Nodes[0], null); ASPxTreeList1.ExpandAll(); } catch { TreeView1.Nodes.Add(new TreeNode("Нет этементов для сравнения")); } }