TreeListNodes.Clear() Method

Removes all elements from the current node collection.

Namespace: DevExpress.XtraTreeList.Nodes

Assembly: DevExpress.XtraTreeList.v21.2.dll


public void Clear()


A node’s child nodes are stored in the TreeList.Nodes collection. Use the Clear method to remove all child nodes of a specific node.

using DevExpress.XtraTreeList.Nodes.Operations;

treeList1.NodesIterator.DoOperation(new MyOperation(colDEPARTMENT));

public class MyOperation : TreeListOperation {
    public TreeListColumn column;
    public MyOperation(TreeListColumn column) {
        this.column = column;
    public override void Execute(TreeListNode node) {
        if (node.GetValue(column).ToString().Contains("Marketing"))
See Also