A
Asheesh
Hi All,
I'm using a listview control in which I highlight the first item in the
listview control using lv.Item[0].Selected=true.
This works fine, but if there are only 2 items in the listview control, and
I press on any other area within the listview control, the highlighted
becomes unhighlighted.
Upon this when I try to access the property
lvTranslations.Items[lvTranslations.SelectedIndices[0]].SubItems[1].Text, I
receive an ArgumentOutofRangeException, which is correct since there isn't
any item highlighted currently.
Is there a way whereby I can prevent the user from unhighlighting the
highlighted item, or is there any other way to access the selected item?
Please help!
Regards,
Asheesh
I'm using a listview control in which I highlight the first item in the
listview control using lv.Item[0].Selected=true.
This works fine, but if there are only 2 items in the listview control, and
I press on any other area within the listview control, the highlighted
becomes unhighlighted.
Upon this when I try to access the property
lvTranslations.Items[lvTranslations.SelectedIndices[0]].SubItems[1].Text, I
receive an ArgumentOutofRangeException, which is correct since there isn't
any item highlighted currently.
Is there a way whereby I can prevent the user from unhighlighting the
highlighted item, or is there any other way to access the selected item?
Please help!
Regards,
Asheesh