TreeListNodes.Clear() Method
Removes all elements from the current node collection.
Namespace: DevExpress.XtraTreeList.Nodes
Assembly: DevExpress.XtraTreeList.v19.1.dll
Declaration
Remarks
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"))
node.Nodes.Clear();
}
}
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the Clear() method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
See Also