i have a data grid,, connected in ms access via code, on its celldoubleclick event i have the code
Public Sub dgv1_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgv1.CellDoubleClick Dim empid As Object = dgv1.Rows(e.RowIndex).Cells(0).Value display.Text = Convert.ToString(empid) editempfrm.ShowDialog() End Sub
it suppose to display its content to the next form for editing.
the problem is, when the header,the row containing the title, were double clicked i got this error
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
is there any way to make this work properly?