Back to Devexpress

TreeList.ClearNodes() Method

windowsforms-devexpress-dot-xtratreelist-dot-treelist-ba863a44.md

latest2.2 KB
Original Source

TreeList.ClearNodes() Method

Removes all nodes from the XtraTreeList.

Namespace : DevExpress.XtraTreeList

Assembly : DevExpress.XtraTreeList.v25.2.dll

NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList

Declaration

csharp
public void ClearNodes()
vb
Public Sub ClearNodes

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ClearNodes() 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.

winforms-treelist-copy-nodes-to-another-treelist/CS/CopyNodesExample/MainForm.cs#L34

csharp
private void ClearButtonItem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) {
    treeList2.ClearNodes();
}

winforms-treelist-copy-nodes-to-another-treelist/VB/CopyNodesExample/MainForm.vb#L37

vb
Private Sub ClearButtonItem_ItemClick(ByVal sender As Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs)
    treeList2.ClearNodes()
End Sub

See Also

TreeList Class

TreeList Members

DevExpress.XtraTreeList Namespace