Datagridview selection changed event
Posted on 2010-09-17
I have a code on DataGridView1_SelectionChanged
Private Sub DataGridView1_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGridView1.SelectionChanged
For Each r As DataGridViewRow In DataGridView1.SelectedRows
r.Cells(0).Value = True
The problem is that when I bind the grid with datatable its first row is selected by default which I deselect with clear selection on form load but even before that when it is just bound DataGridView1.SelectionChanged
is called and keeps the forst row selected .Any way of stopping this event to be called everytime I have mouse down or is there any other alternative for selection changed event ?