How can I tell what row was clicked on the DataGridView?
Printable View
How can I tell what row was clicked on the DataGridView?
you can use the SelectedRows property, eg:
Code:Private Sub DataGridView1_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGridView1.SelectionChanged
If DataGridView1.SelectedRows.Count > 0 Then
Console.WriteLine(DataGridView1.SelectedRows(0).Index)
End If
End Sub