DataGridView, RowEnter exception upon header select
-
I'm filling a datagridview with rows of data and upon selection (RowEnter event) of a full row the primary key is copied into a textbox which is then used as a foreign key in another table and gives me the quantity of rows containing the foreign key. This is fine and dandy, except when I click on the DataGridView headers it throws an exception:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: indexAny ideas as to why this is occurring? Thanks in advance!
-
I'm filling a datagridview with rows of data and upon selection (RowEnter event) of a full row the primary key is copied into a textbox which is then used as a foreign key in another table and gives me the quantity of rows containing the foreign key. This is fine and dandy, except when I click on the DataGridView headers it throws an exception:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: indexAny ideas as to why this is occurring? Thanks in advance!