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

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
 
P

Pavel Minaev

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top