[data grid] Implement cell selection with range
Turn the 1D selection (rows) into 2D (cells).
Benchmark
- https://glideapps.github.io/glide-data-grid/?path=/story/glide-data-grid-docs--search
- https://ag-grid.com/javascript-grid-range-selection/
- https://handsontable.com/docs/8.0.0/demo-selecting-ranges.html
- https://adazzle.github.io/react-data-grid/docs/examples/cell-range-selection
- https://www.telerik.com/kendo-react-ui/components/grid/selection/
🔥 Release (Edit: Sep142022)
We expect to release it in Q4 2022. This will be a v6 feature, so if you're okay using alpha and beta packages, you'll probably be able to use it at least a month sooner.
If anyone is willing to help steer the direction of the components, please consider giving us a user interview. We'd love to know more about your use cases, pain points, and expectations for this and other features.
A couple of thoughts about the implementation of this feature:
- Rename
useGridSelection->useGridRowSelection - Keep
selectionModelandonSelectionModelChangeonly for row selection. We could rename them as well - Create the
useGridRangeSelectionhook with its own state - Add a
rangeSelectionModelprop to control the range selection - Clicking a cell firstly focuses it
- Clicking and moving the mouse selects other cells (focus remains in the first clicked/outlined)
Note: When I say "focus" I refer to update the focus state.

Hello. Any idea on the timeline of the release of this feature?
I wanna implement a Date Range picker in MUI DataGridPro is there any solution?
Hello. Would really love to see this feature implemented.
Some clarifications are needed about this feature request
How are multiple selections made? (any or all of these)
- click and drag to select a "block"
- ctrl/cmd-click to select individual cells that may not be near each other
- click to select, then shift-click to select a block of cells
- How to select for keyboard-only users
Editing Cells
I am interested in the ability to edit multiple cells at once. Would this be a separate feature? There is some complexity about this feature:
- We may want to limit editing multiple cells to a single column where (we presume) the type of content will be the same.
- How do we then limit this if the user needs to also be able to select groups of cell in multiple columns for copy and paste?
- The edit will need to take place somewhere. If multiple cells are selected, I think it would be good to have a separate spot, perhaps a small modal, with a field that you would enter the new data. This would solve 2 above because that field would only appear if cells from a single column were selected. Also, that field could have a button with "update {x} cells" to alert the user on what will be updated.
For the editing it look a lot like https://github.com/mui/mui-x/issues/4262
We have several tightly related subjects around cell selection I think it would be worth cleaning the issues
Maybe we will also need an onCopy event in case of formatting the copied values
Is there an update on this? The roadmap for Q3 was never updated.
Is there any timeline when this will be available? We have a release this year, where it would be awesome to have this feature
@fabioel, @samborambo305, We expect to release it in Q4. It will be a v6 feature, so if you're okay using alpha and beta packages, you'll probably be able to use it at least a month sooner.
And if anyone is willing to help steer the direction of the components, please consider giving us a user interview. We'd love to know more about your use cases, pain points, and expectations for this and other features.
The initial implementation of the cell selection feature is complete. You can visit the pre-release docs and play with it.
We would like the feedback from everyone #6567 on what this feature is lacking for it to be awesome and satisfy most of the use cases. Note that this implementation doesn't contain yet the ability to copy the selected cells to clipboard or edit multiple cells at once. Clipboard support will be added in #199.
Hello, is the cell selection feature available for use in an alpha or a beta build?
@Sandrodro it's not available in the alpha version yet, but you can use the pre-release build from the docs by opening any demo in CodeSandbox.
oh ok, and do you have an ETA when the v6.0 version proper will be released?