I really had to do this:
int[] indicies = new int[listViewCat.SelectedIndices.Count]; listViewCat.SelectedIndices.CopyTo(indicies, 0); foreach(ListViewItem item in listViewCat.SelectedItems){ listViewCat.Items.Remove(item); G.Categories.Remove(item.Text); } int k = 0; foreach(int i in indicies) listViewCat.Items[i+(k--)].Selected = true; listViewCat.Select();
to make it work, none of the other solutions worked for me.
Hope a more experienced programmer can give a better solution.
source share