blazor-devexpress-dot-blazor-dot-dxtreeview-a02bf8e2.md
Checks all nodes in the TreeView.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
public void CheckAll()
You can check all TreeView nodes as follows:
CheckAll() methodCall the ClearCheck() method to uncheck all nodes.
Note
The following actions change the check state of all nodes, even those that do not meet the applied filter criteria:
CheckAll() method callThe following example checks all nodes on a button click:
<DxButton Text="Check All" Click="Click" />
<DxTreeView @ref="MyTreeView"
Data="@Data"
CheckMode="TreeViewCheckMode.Multiple">
<DataMappings>
<DxTreeViewDataMapping Text="Name"
Key="Id"
ParentKey="CategoryId" />
</DataMappings>
</DxTreeView>
@code {
DxTreeView MyTreeView;
void Click() {
MyTreeView.CheckAll();
}
// ...
}
See Also