Column selection

Letting the user select whole columns with selectable.columns.

Last updated August 3, 2026

selectable.columns takes false, "single", or "multiple" — off by default, since selection claims the click a display-only grid shouldn't. A column click replaces the selection, Ctrl-click toggles one column in or out, and Shift-click takes every column between the last click and this one.

Multi-select columns

selectable={{ columns: "multiple" }}

Live example
IdServiceEnvironment NameEnvironment RegionStatusCost
1checkout-apiproductionus-east-1healthy1240.5
2billing-workerproductioneu-west-1degraded860.2
3search-indexstagingus-east-1healthy92.75
4notificationsproductionus-west-2down305.4
5analytics-pipelinestagingeu-west-1healthy145
  1. Interact with the grid above to see its callbacks fire.
<DataGridComponent
  columns={columns}
  dataSource={rows}
  selectable={{ columns: "multiple" }}
  onColumnSelectionChange={({ selected }) => persist(selected)}
/>;

Props

PropTypeDefaultDescription
selectable.columnsfalse | "single" | "multiple"falseHow many columns the user may select at once.
defaultColumnSelectionSelectionStateColumn ids selected to start with. Uncontrolled.
onColumnSelect / onColumnsSelect(event) => voidOnce per column newly selected, and once per interaction with every column it selected.
onColumnDeselect / onColumnsDeselect(event) => voidThe deselecting counterpart of each, above.
onColumnSelectionChange(event: ColumnSelectionChangeEvent) => voidOnce per change with what it added, what it removed, and everything selected after — the one to persist from.
Edit this page on GitHub