I have a datagridview on my form. When the user clicks on a row, it executes code that reads data based on the value in column 0 of the selected row. I do not want to execute this code if the user clicks on the top header of the datagridview. I did some searching and came up with this:


Code:
Private Sub DataGridView1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGridView1.Click
If e.RowIndex < 1 Then Exit Sub

but I get an error message when I type it in that says "RowIndex is not a member of System.EventArgs". How can I rid of this error or otherwise distinguish between a click on a row and a click above the rows?