Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
As you can see in the sample code, I tried two different methods, but neither works. Both throw the error:
Private Sub DataGridView1_CellEnter(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellEnter If e.ColumnIndex = 0 Then 'DataGridView1.Rows(e.RowIndex).Cells(1).Selected = True 'Didn't Work DataGridView1.CurrentCell = DataGridView1.Item(1, e.RowIndex) 'Didn't Work too End If End Sub
Operation is not valid because it results in a reentrant call to the SetCurrentCellAddressCore function.
Join the community of 500,000 technology professionals and ask your questions.