Back to Devexpress

TreeList.VisibleNodesCount Property

windowsforms-devexpress-dot-xtratreelist-dot-treelist-150504cb.md

latest3.2 KB
Original Source

TreeList.VisibleNodesCount Property

Gets the number of rows which are not hidden within collapsed groups.

Namespace : DevExpress.XtraTreeList

Assembly : DevExpress.XtraTreeList.v25.2.dll

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

Declaration

csharp
[Browsable(false)]
public int VisibleNodesCount { get; }
vb
<Browsable(False)>
Public ReadOnly Property VisibleNodesCount As Integer

Property Value

TypeDescription
Int32

An integer value representing the number of rows which are not hidden within collapsed groups.

|

Remarks

The TreeList control represents data in a tree-like manner. Each node can have a number of child nodes, which in turn, can serve as parents for other nodes, etc. Each parent node can be expanded/collapsed in order to show/hide their children respectively. A node is visible if all its parent rows are expanded. If at least one parent of a node is collapsed, the node is invisible.

Use the VisibleNodesCount property to determine the number of nodes which are not hidden within collapsed groups.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the VisibleNodesCount property.

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-tokenedit-dropdown-with-treelist/CS/TokenEditTest/CustomTokenEditDropDownControl.cs#L30

csharp
TreeList.FilterNodes();
    if(TreeList.VisibleNodesCount == 0) OwnerEdit.ClosePopup(PopupCloseMode.Cancel);
}

winforms-tokenedit-dropdown-with-treelist/VB/TokenEditTest/CustomTokenEditDropDownControl.vb#L32

vb
TreeList.FilterNodes()
If TreeList.VisibleNodesCount = 0 Then
    OwnerEdit.ClosePopup(PopupCloseMode.Cancel)

See Also

AllNodesCount

Count

TreeList Class

TreeList Members

DevExpress.XtraTreeList Namespace