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 = 4ormylist.selectedIndices = [0,2,7] -
Select item by reference:
mylist.selectedItem = item0ormylist.selectedItem = [item0, item1]
2 Likes
Thanks for pointing them out @melMass, missed those for a couple of days.
1 Like