I want it to only be possible to select one cell in a DataGrid. With multi select disabled, you can still select a range of cells, but I want it to only allow a single-cell selection. Is there any way to do this through the properties? Or will I have to intercept the selection and filter out everything but one cell?
Share
The
DataGridhas aSelectionUnitproperty of typeDataGridSelectionUnit, in conjunction withSelectionMode:Try setting
SelectionUnittoCell. This will work with bothSelectionModevalues:To select a single cell, use
SelectionModeofSingleandSelectionUnitofCell: