Remove from Collection

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
I have 10 items in the listview.
I have 10 Object of this 10 items in the collection.

I want to loop through the collection then remove the items from listview. The index of the items is stored in the 10 objects, and static unchanged.
If I use for each loop, once the items has been removed, the index of every item in the listview will changed.(when you remove an item in the listview, the next line item will get shift up a row)

How am I going to fix this? if using for each loop, some of them items will not get deleted.

Or is it possible to do a "Do Loop" or "Backward For loop" for a type collection?



View the full article
 
Back
Top