devexpress TreeList递归的实例代码
程序员文章站
2022-03-05 14:44:12
...
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递归的实例代码的详细内容,更多请关注其它相关文章!
上一篇: 关于.net 3.5中的委托实例