TreeList.FindNode(Predicate<TreeListNode>) Method
Returns the first node that matches the specified criteria.
Namespace: DevExpress.XtraTreeList
Assembly: DevExpress.XtraTreeList.v20.1.dll
NuGet Package: DevExpress.Win.TreeList
Declaration
Parameters
Name | Type | Description |
---|---|---|
match | Predicate<TreeListNode> | The method that defines a set of criteria and determines whether a TreeListNode meets those criteria. |
Returns
Type | Description |
---|---|
TreeListNode | The first node that matches the specified criteria. null (Nothing in Visual Basic) if no matching node is found. |
Remarks
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";
}
);
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the FindNode(Predicate<TreeListNode>) 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.