Can't seem to be able to set ListViewItem.imageIndex
- by TKL
I have been scratching my head with this error for at least an hour, what the heck is wrong here?
In a loop:
if (selectedItems[x].ImageIndex == 3)
{
List<ListViewItem> dupes = CP.listCache.FindAll(delegate(ListViewItem item) { return item.Text == selectedItems[x].Text; });
if (dupes != null && dupes.Count == 1)
dupes[0].ImageIndex = 0;
}
I can access the imageIndex, but not set it. ArgumentOutOfRange exception occurs.