Jonhston Hirsh
Jonhston Hirsh

Reputation:

C#: Is there a way to SET the selected index of an item in listview at runtime?

C#: Is there a way to SET the selected index of an item in listview at runtime?

Upvotes: 1

Views: 2171

Answers (2)

JaredPar
JaredPar

Reputation: 755587

Try this

listView.SelectedIndices.Clear();
listView.SelectedIndices.Add(someIndex);

Upvotes: 1

Related Questions