I have a datagridview that is working fine. However, I set a CellDoubleClick to do an event and everytime I accidently click on the header of a column, I get "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index".
I would I set it so that it would either exit the event or not give me an unhandled error? Below is my attempt to exit sub if they click on header, but that's where it error out with the index out of range.
If dgViewDetail.Rows(e.RowIndex).Cells("ID").Value = 0 Then