Folks,
I'm new to this game and struggling to figure out why this error is occurring and how I should solve it.
At first the problem seemed intermittent, but I've now figured out how to replicate it over and over. I have a datagridview control with six columns, two if which are datagridviewLinkcolumns. If the user clicks on one of the links in one of these columns, the event is handled using CellContentClick.
If I immediately resize one of the link columns, immediately after it's contents are clicked, I get an error. The error is generated in my CellContentClick routine and relates to the line
The error is an out of range exception and states the index was out of range must be non-negative and less than the size of the collection. Strange (to me) that the error is actually happening when the column is being resized and not when a cell contents are clicked.
Thanks
I'm new to this game and struggling to figure out why this error is occurring and how I should solve it.
At first the problem seemed intermittent, but I've now figured out how to replicate it over and over. I have a datagridview control with six columns, two if which are datagridviewLinkcolumns. If the user clicks on one of the links in one of these columns, the event is handled using CellContentClick.
If I immediately resize one of the link columns, immediately after it's contents are clicked, I get an error. The error is generated in my CellContentClick routine and relates to the line
VB.NET:
Dim threadID as String = dgvPosts.Rows(e.RowIndex).Cells(6).Value
The error is an out of range exception and states the index was out of range must be non-negative and less than the size of the collection. Strange (to me) that the error is actually happening when the column is being resized and not when a cell contents are clicked.
Thanks