ListView task: it does not jump to the selected item

Ok, I say lsvAvailable.Items [index] .Selected = true; and HideSelection is false, so it shows a gray color back on the selected item that I want ... but if the found item is somewhere in the list, so I need to scroll it to view it. it is not JUMP to this element ... and yet I need to continue to write (let's say I print a text field as a search box and it shows the element in the View list)

+3
source share
1 answer

Call the ListViewItem.EnsureVisible method :

lsvAvailable.Items[index].EnsureVisible();
+4
source

Source: https://habr.com/ru/post/1774198/


All Articles