欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

devexpress TreeList递归的实例代码

程序员文章站 2022-03-22 13:52:58
...
          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();}

以上就是devexpress TreeList递归的实例代码的详细内容,更多请关注其它相关文章!