Back to Devexpress

DxTreeView.GetNodeInfo(Func<ITreeViewNodeInfo, Boolean>) Method

blazor-devexpress-dot-blazor-dot-dxtreeview-dot-getnodeinfo-x28-system-dot-func-devexpress-dot-blazor-dot-itreeviewnodeinfo-system-dot-boolean-x29.md

latest1.7 KB
Original Source

DxTreeView.GetNodeInfo(Func<ITreeViewNodeInfo, Boolean>) Method

Returns information about the specified node.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public ITreeViewNodeInfo GetNodeInfo(
    Func<ITreeViewNodeInfo, bool> predicate
)

Parameters

NameTypeDescription
predicateFunc<ITreeViewNodeInfo, Boolean>

A method delegate that specifies a particular node.

|

Returns

TypeDescription
ITreeViewNodeInfo

An object that contains information about the found node.

|

Remarks

The following code snippet gets a URL of a node specified by its text.

razor
<button type="button" @onclick="@(() => GetNodeUrl("Lanthanides"))">Get URL</button>
<DxTreeView @ref="@SampleTreeView">
    @* ... *@
</DxTreeView>

@code {
    DxTreeView SampleTreeView;
    string NodeUrl = "none";

    void GetNodeUrl(string text) {
        NodeUrl=SampleTreeView.GetNodeInfo((n) => n.Text == text).NavigateUrl;
    }
}

Note

This method is not in effect if Load Child Nodes on Demand mode is enabled, and the specified node is not loaded yet.

See Also

DxTreeView Class

DxTreeView Members

DevExpress.Blazor Namespace