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递归的实例代码的详细内容。更多信息请关注PHP中文网其他相关文章!