Cell selection
Letting the user select one cell at a time with selectable.cells.
Last updated August 3, 2026
selectable.cells takes only false or "single": a cell addresses one value, so there is no "multiple" and no range to take. A click moves the selection to that cell; Ctrl-click on the selected cell clears it.
Single-select cells
selectable={{ cells: "single" }}
Live example- Interact with the grid above to see its callbacks fire.
<DataGridComponent
columns={columns}
dataSource={rows}
getRowId={(row) => String(row.Id)}
selectable={{ cells: "single" }}
onCellSelect={({ cell }) => console.log(cell.value)}
/>;Props
| Prop | Type | Default | Description |
|---|---|---|---|
selectable.cells | false | "single" | false | How many cells the user may select at once — no "multiple": a cell addresses one value, so there is no range to take. |
defaultCellSelection | CellSelectionState | The cell selected to start with. Uncontrolled. | |
onCellSelect / onCellDeselect | (event: CellSelectEvent) => void | Once for the cell selected, once for the cell deselected. | |
onCellSelectionChange | (event: CellSelectionChangeEvent) => void | Once per change with what was selected and what was deselected — one interaction can fill both, since moving between cells deselects and selects at once. |