原文出自:http://blog.csdn.net/nash603/article/details/5923727
问题: 不知道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.
You may use the GetValue or GetDisplayText method of a TreeListNode to get data from the selected node. The FocusedNode property of the tree list will access the currently focused TreeListNode.
终于知道原来是FocusedNode 这个函数,晕死,汗