in my lvConcepts_SelectedIndexChanged(..)
I have ...
MessageBox.Show(lvConcepts.SelectedItems[0].SubItems[0].Text);
It works the first time I click on the ListView. If I click again I get
"An unhandled exception of type 'System.ArgumentOutOfRangeException'
... InvalidArgument=Value of '0' is not valid for 'index'."
What is going on!?
Thanks for any help.
Loading
Stephen FletcherPosted Jun 25, 2009, 12:27 PM
There is obviously some sort of deselect happening before the new selection.
I wrapped a count check around my MessageBox line and it worked...
if(lvConcepts.SelectedItems.Count > 0)
MessageBox(...)
and it worked.