DevExpress TreeList 全选和反选 z

/// <summary>
/// 全选树
/// </summary>
/// <param name="tree">树控件</param>
/// <param name="nodes">节点集合</param>
public virtual void SelectTreeListAll(DevExpress.XtraTreeList.TreeList tree,TreeListNodes nodes=null)
{
nodes = nodes ?? tree.Nodes;
foreach(TreeListNode item in nodes)
{
tree.Selection.Add(item);
if (tree.HasChildren)
{
SelectTreeListAll(tree, item.Nodes);
}
} }
上一篇:VC++动态链接库(DLL)编程深入浅出(二)


下一篇:VC-基础:VC++动态链接库(DLL)编程深入浅出