Skip to main content
All docs
V23.2

DxTreeView.GetCheckedNodeInfo() Method

Returns a collection of currently checked nodes.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor

Declaration

public IEnumerable<ITreeViewNodeInfo> GetCheckedNodeInfo()

Returns

Type Description
IEnumerable<ITreeViewNodeInfo>

Checked nodes.

Remarks

The example below gets a collection of checked nodes and displays size of this collection:

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();
    }
}

Collection of checked nodes

See Also