vb.net - Arrow keys don't work after programmatically setting the selected item in a listview -


i have listview things in it, , have sub refresh listview deleting in , re-populating it.

however, when user selects item , list refreshes, wanted have same item select once more. accomplished doing:

listview.items(4).selected = true  listview.select() 

which selects 5th item in list view (counting 0). however, when user presses or down keys, selected item jumps top item in list, , can't find way around this.

the search has come here: arrow keys don't work after programmatically setting listview.selecteditem

but not understand responses, need dumbed down version or simpler solution if possible, thank you.

try using focused property on item. seems may have run before.

listview.items(4).focused = true 

you may need set same property false first item in list.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -