Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxTreeView.GetCheckedNodeInfo() Method

Returns a collection of currently checked nodes.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public IEnumerable<ITreeViewNodeInfo> GetCheckedNodeInfo()

#Returns

Type Description
IEnumerable<ITreeViewNodeInfo>

Checked nodes.

#Remarks

The following code snippet gets a collection of checked nodes and displays size of this collection:

Razor
Number of checked nodes: @CheckedCount

<DxTreeView @ref="MyTreeView" 
            Data="@Data"
            CheckMode="TreeViewCheckMode.Recursive">
    <DataMappings>
        <DxTreeViewDataMapping Text="Name"
                               Key="Id"
                               ParentKey="CategoryId" />
    </DataMappings>
</DxTreeView>

<DxButton Text="Count Checked Nodes" Click="GetCheckedNodes" />

@code {
    DxTreeView MyTreeView;
    int? CheckedCount;
    void GetCheckedNodes() {
        CheckedCount = MyTreeView.GetCheckedNodeInfo().Count();
    }
}

See Also