If I call ListView.Items.RemoveAt(i) to remove a selected item from a listview, it automatically selects the next item. I don’t want it to. How do I prevent that from happening, or make it unselect the current item?
I tried this but it didn’t work.
Application.Update(lvIssues)
If Me.lvIssues.SelectedItems.Count > 0 Then
Me.lvIssues.SelectedItems(0).Selected = False
End If
Thanks Andrew.
Logged as #1844
Best regards
Frank
Hi Andrew,
can´t reproduce, can you please share a test sample ?
Best regards
Frank
I don’t have a sample for you at this time but this is related:
If I call .RemoveAt, it calls listview.SelectedIndexChanged.
The visual representation shows the next item selected, however, listview.SelectedItems.Count = 0.
Why would it show the selected item but still have Count = 0?
Here is a sample.
Please login first to submit.