Reputation:
C#: Is there a way to SET the selected index of an item in listview at runtime?
Upvotes: 1
Views: 2171
Reputation: 755587
Try this
listView.SelectedIndices.Clear();
listView.SelectedIndices.Add(someIndex);
Upvotes: 1
Reputation:
Find the item in the collection you want selected and set its public property Selected = true.
Upvotes: 1