DataGridView automatically selects first row

  • Thread starter Thread starter Brett
  • Start date Start date
B

Brett

I'm setting the datasource of a DataGridView to a datatable. This
loads the grid correctly but it automatically selects the first row in
the grid, triggering the SelectionChanged event. Is there a way to
stop the grid from automatically selecting the first row?

Thanks.
 
You would just as well do this: datagridviewname.ClearSelection(); right
after loading data.
 
Back
Top