DataGridView: No selection mode (Forms)

To prevent selection in a DataGridView add the SelectionChanged event

private void dataGridView_SelectionChanged(object sender, EventArgs e)
{
	//Just to be sure this will not become recursive 
	if (dataGridView.SelectedRows.Count > 0) dataGridView.ClearSelection();  
}

Leave a Reply

Your email address will not be published. Required fields are marked *