ListView Selected Item Move to Another Control

When I select an item in the list view I'm using the SelectedIndexChanged procedure to run some code. At the end of the code I would like the cursor to be be put in TextBox TB1. When I use TB1.Focus() the system still keeps the items in the ListView Selected to have the focus. If through the code I change the selecteditem everything works. The problem is when the user clicks the item.

Thanks for everyones assistance.


Answer this question

ListView Selected Item Move to Another Control

  • Callavin

    Hi,

    According to what you said, it's quite nature. Because you put the code in the SelectedIndexChanged event of the listview control, only when the listview's selected item changed the code can be excuted (the textbox get focus). So, if you click the item, it does not change. That's the problem. So you gonna put the code in other appropriate event of the listview which depends on your need.

    Thank you



  • ListView Selected Item Move to Another Control