I have a ListView in my project that has dynamically added/edited/deleted items. When the user deletes an item, I want the item that replaces the deleted item to be highlighted. I tried simply storing the deleted item's index then highlighting the item there (list.Items(index).Selected = True
). This works well unless the item deleted was the last item in the ListView (both literally and sequentially). I'm having issues today with logic and can't quite come up with code that checks for these kinds of cases.
Could anyone help me? I feel incredibly stupid but my brain just falls apart today.