Example of Checkbox Selection in Blazor DataGrid Component

DataGrid / Selection / Checkbox Selection

This sample demonstrates the DataGrid's checkbox selection functionality. Using the header checkbox, you can select or deselect all rows. Click the desired row checkbox to select or deselect it.

1 of 7 pages (75 items)

The Blazor DataGrid supports multi-selection through the use of checkboxes in each row. To display a checkbox in each DataGrid row, set the column type to CheckBox in the GridColumn component's Type property.

The PersistSelection property of the GridSelectionSettings component can be used to persist selection across all operations. Any one of the columns should be defined as a primary key using the GridColumn component's IsPrimaryKey property for persisting selection on the DataGrid.

DataGrid multi-selection is enabled in this demo, along with selection persistence.

More information about the Checkbox selection feature can be found in this documentation section.

Transform your Blazor web apps today with Syncfusion® Blazor components
100+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE