Index -1 does not have a value , when clicking a cell in datagridview

  • Thread starter Thread starter Sumit
  • Start date Start date
S

Sumit

Hi

I have a DataGridView, which I am binding to List<T>. The binding goes
through, I see the expected rows. But when I click the second row, I
get "Index -1 does not have a value.".

Please advise.

Thanks
-Sumit
 
I have a DataGridView, which I am binding to List<T>. The binding goes
through, I see the expected rows. But when I click the second row, I
get "Index -1 does not have a value.".

Please advise.

Without seeing the code, it is impossible to say anything useful.
Likely, it's a mistake in one of your event handlers for the
DataGridView.
 
Back
Top