TreeList.FindNode(Predicate<TreeListNode>) Method

Returns the first node that matches the specified criteria.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v20.1.dll


public TreeListNode FindNode(
    Predicate<TreeListNode> match
Public Function FindNode(
    match As Predicate(Of TreeListNode)
) As TreeListNode


Name Type Description
match Predicate<TreeListNode>

The method that defines a set of criteria and determines whether a TreeListNode meets those criteria.


Type Description

The first node that matches the specified criteria. null (Nothing in Visual Basic) if no matching node is found.


The FindNode method calls the specified predicate for each node in the data source until the predicate returns true. When this happens, the currently processed node is returned by the FindNode method.

The following example shows how you can get the first node that has the "London" string in the City column:

TreeListNode myNode = treeList1.FindNode((node) => {
    return node["City"].ToString() == "London";
See Also