Home  >  Article  >  Backend Development  >  devexpress TreeList recursive example code

devexpress TreeList recursive example code

零下一度
零下一度Original
2017-06-23 16:06:012029browse
          XtraUserControlBlankList_Load(= = = = = ;= = = = = = = = .BlankTreeList.Columns.AddRange( [] {,}, TreeListNode node = .BlankTreeList.FindNodeByFieldValue(, ); == =  (dt.Rows.Count >  (DataRowView dv1 [] nodeview = { dv1[], dv1[], dv1[=].ToString(),dt,tn);

 

 private void GetChild(string upnode, DataTable dt,TreeListNode tn)
        {try{
                DataView dv = new DataView(dt);
                dv.RowFilter = "ParentId = '" + upnode + "'";foreach (DataRowView dv1 in dv)
                {object[] nodeview = { dv1["BlankID"], dv1["BlankName"], dv1["ParentId"] };
                    TreeListNode childnode = BlankTreeList.AppendNode( nodeview , tn);
                    GetChild(dv1["BlankID"].ToString(), dt, childnode);//参数(父级ID,DataTable表,父节点)                }
            }catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

 

 private void BlankTreeList_FocusedNodeChanged_1(object sender, FocusedNodeChangedEventArgs e)
        {
            TreeListNode curNode = e.Node;if (curNode == null) return;
            TxtE1.Text = curNode.GetValue("BlankID").ToString();}

 

The above is the detailed content of devexpress TreeList recursive example code. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn