Back to Devexpress

TreeList.FindNodes(Predicate<TreeListNode>) Method

windowsforms-devexpress-dot-xtratreelist-dot-treelist-dot-findnodes-x28-system-dot-predicate-devexpress-dot-xtratreelist-dot-nodes-dot-treelistnode-x29.md

latest2.2 KB
Original Source

TreeList.FindNodes(Predicate<TreeListNode>) Method

Returns all nodes that match the specific criteria.

Namespace : DevExpress.XtraTreeList

Assembly : DevExpress.XtraTreeList.v25.2.dll

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

Declaration

csharp
public TreeListNode[] FindNodes(
    Predicate<TreeListNode> match
)
vb
Public Function FindNodes(
    match As Predicate(Of TreeListNode)
) As TreeListNode()

Parameters

NameTypeDescription
matchPredicate<TreeListNode>

A Predicate that specifies the search criteria.

|

Returns

TypeDescription
TreeListNode[]

An array of the TreeListNode objects that match the specific criteria.

|

Remarks

The code below illustrates how to return all nodes whose display text for the first TreeListColumn starts with the word “Market”.

csharp
TreeListNode[] collection = treeList1.FindNodes(x => x.GetDisplayText(0).StartsWith("Market"));
vb
Dim collection() As TreeListNode = treeList1.FindNodes(Function(x) x.GetDisplayText(0).StartsWith("Market"))

See Also

TreeList Class

TreeList Members

DevExpress.XtraTreeList Namespace