DataGridView first column,first row, is selected on Load, I don't want this

I was having quite a bit of trouble with this myself. I have a user control with a DataGridView that is populated on application/form load. The selection of the first row seems to happen after databinding is complete and the grid is populated/rendered. The user control load event (and presumably, form load as well) fires prior to that - so calling gridView.ClearSelection() or nullifying gridView.CurrentCell in those load events has no net effect.

What finally worked for me was calling .ClearSelection() from the DataBindingComplete event of the DataGridView itself. This worked like a charm.


I had this same issue and nothing was working. The solution that worked for me was setting the 'Tabstop' property to False and calling the ClearSelection() method immediately after the data bind.


Set the DGV's CurrentCell property to null after data binding the DGV:

dataGridView1.CurrentCell = null; 

Note that doing this won't prevent DGV events associated with row and cell selection from firing; you'll have to add selected row or cell count checks on RowEnter events, something like this:

private void dataGridView1_RowEnter(object sender, DataGridViewCellEventArgs e) {
    if (dataGridView1.SelectedRows.Count == 1) {
        // Do stuff since a row is actually selected ...
    }
}