DataGrid / Selection / Drag Selection

Blazor DataGrid Example - Drag Selection

Loading Syncfusion Blazor Server Demos…

1 of 7 pages (75 items)
Properties
Selection Mode
Cell Selection Mode

This sample demonstrates the Blazor DataGrid with draggable row and cell selection functionality.

The Blazor DataGrid allows you to select multiple rows or cells by dragging your mouse or using touch interactions. To enable this feature, set the AllowDragSelection property to true in the GridSelectionSettings component.

Drag selection supports two cell selection modes, configurable using the GridSelectionSettings component's CellSelectionMode property:

  • Flow - A range of cells is selected between the start and end indexes, including all cells in between rows.
  • Box - A range of cells is selected from the start and end column indexes, including cells within rows in the specified range.

In this demo, the DataGrid is configured in row selection mode. You can change the selection Mode and CellSelectionMode using the provided options.

To enable multi-selection by dragging, set the selection Type property to Multiple.

For more detailed information about drag selection, refer to the selection documentation.

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