So I have several datagridviews that we had set to FullRowSelect. The users are now requesting the ability to select on single cells for copy functions.
I set the DataGridView to CellSelect but when I run the app, when I click on the Row Header it doesn’t highlight the Full Row, only the first column.
I tried using the RowHeaderMouseClick with a CellMouseClick to get the selection mode to shift but in order for RowHeaderMouseClick to select it fully I am having to click on the row header multiple times.
private void DataGridView_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
{
dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
}
How can I easily or not so easily switch back and forth between CellSelect and FullRowSelect depending on what they have selected on the grid?
If I understand you, you want to be able to select single cells but also easily select a full row?
If that’s the case, set SelectionMode to
RowHeaderSelect.