Skip to main content

HierarchicalCollection<T>.FindAllRecursive(Predicate<T>) Method

Returns all elements that match the conditions defined by the specified predicate.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v22.2.dll


public IEnumerable<T> FindAllRecursive(
    Predicate<T> match


Name Type Description
match Predicate<T>

A delegate that defines the conditions of the elements to search for.


Type Description

A collection of the elements that match the conditions defined by the predicate.


The FindAllRecursive method individually passes elements of the current hierarchical collection to a predicate, and returns a collection of elements that match the predicate. A predicate is a delegate to a method that returns true if the object passed to it matches the conditions defined in the delegate; otherwise the method returns false.


The code sample below demonstrates how to get a collection of checked nodes on the server side. For this purpose, the FindAllRecursive method is used. The IsChecked predicate determines whether a node is checked.

using DevExpress.Web.ASPxTreeView;
IEnumerable<TreeViewNode> CheckNodeList = ASPxTreeView1.Nodes.FindAllRecursive(IsChecked);
private static bool IsChecked(TreeViewNode node) {
     return node.Checked;
See Also