If you want to clear (unhighlight) the selected item(s):
for (int x = (this.listView1.SelectedIndices.Count - 1); x >= 0; x--)
{
this.listView1.Items[this.listView1.SelectedIndices[x]].Selected = false;
}
If you want to remove the selected item(s):
for (int x = (this.listView1.SelectedIndices.Count - 1); x >= 0; x--)
{
this.listView1.Items.RemoveAt(this.listView1.SelectedIndices[x]);
}
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.