C
Curious
Hi,
I am removing problems but I am having a problem. The code below is
the code being used to remove items from the listview.
ListViewItem oldItem = listViewAllStates.SelectedItems[0];
listViewNextStateSelected.Items.Remove(oldItem);
My problem occurs in the following scenario (example):
Initially ListView empty
Add an item
select first item + remove it
add 2 new items
select first item + remove it.......an error occurs.
I also tried with the SelectedIndeces, and same problem occured. What
I noticed was that the selected index is incorrect. In the same
example the index returned was 2.
Can someone help me out
Thanks in Advance
I am removing problems but I am having a problem. The code below is
the code being used to remove items from the listview.
ListViewItem oldItem = listViewAllStates.SelectedItems[0];
listViewNextStateSelected.Items.Remove(oldItem);
My problem occurs in the following scenario (example):
Initially ListView empty
Add an item
select first item + remove it
add 2 new items
select first item + remove it.......an error occurs.
I also tried with the SelectedIndeces, and same problem occured. What
I noticed was that the selected index is incorrect. In the same
example the index returned was 2.
Can someone help me out
Thanks in Advance