Is there a way to set the current SelectedItem in a ListView with code ?
Yes you have a two options:
-
Select item by index:
mylist.selectedIndex = 4
ormylist.selectedIndices = [0,2,7]
-
Select item by reference:
mylist.selectedItem = item0
ormylist.selectedItem = [item0, item1]
2 Likes