DataGridView automatically selects first row

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.
 
G

Guest

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top