DevExpress.XtraTreeList.TreeList 控件如何找到当前被选中的节点

在DevExpress.XtraTreeList.TreeList控件中,要获取当前选中的节点,可以使用FocusedNode属性结合GetDisplayText方法。例如:string tmp = treeL.FocusedNode.GetDisplayText(this.treeListColumnIndex); 这一解决方案解决了找不到相应成员函数的问题。
摘要由CSDN通过智能技术生成

问题:    不知道DevExpress.XtraTreeList.TreeList 控件的哪个成员函数能够让我们找到当前树形结构中被选中的节点

 

 

解决方案:  string tmp = treeL.FocusedNode.GetDisplayText(this.treeListColumnIndex);

 

 

一开始以为肯定是DevExpress.XtraTreeList.TreeList的成员函数里面以“get...”“selected”开头的函数,一直找不到。

后来google之,在国外论坛发现以下一段评论:

The following help topic has an example of how to append nodes at run time.  Note that the number and order of objects in the array for the first parameter of the AppendNode method must match the number and order of tree list columns that are in the tree list.
 
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值