Link to home
Start Free TrialLog in
Avatar of bertino12
bertino12

asked on

Listview losing selection

I have a listview control. The user can single select an item and it fills a textbox. They can then change the text in the textbox and click update button. When the update button is clicked the listview is losing the selected, highlighted row. How can I maintain this highlighting?

I have the index stored in a variable called intIndex. This isnt working at all. The code is running but the row isnt highlighting selected.

    Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
        ListView1.Items(intIndex).Selected = True
    End Sub
ASKER CERTIFIED SOLUTION
Avatar of Praveen Kumar
Praveen Kumar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial