Back to Devexpress

DxTreeView.GetCheckedNodeInfo() Method

blazor-devexpress-dot-blazor-dot-dxtreeview-467a148e.md

latest1.6 KB
Original Source

DxTreeView.GetCheckedNodeInfo() Method

Returns a collection of currently checked nodes.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public IEnumerable<ITreeViewNodeInfo> GetCheckedNodeInfo()

Returns

TypeDescription
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

DxTreeView Class

DxTreeView Members

DevExpress.Blazor Namespace