Reputation: 2733
I don't get it to work to select a row of a listview at the beginning of my program.
if (listView1.Items.Count > 0)
{
listView1.Items[0].Selected = true;
listView1.Items[0].Focused = true;
}
After running this snippet the first item is selected and focused.
listView1.Items[0].Selected
true
listView1.Items[0].Focused
true
after clicking manually an item in the listview I can walk thru this list with
listView1.Items[newPosition].Selected = true;
regards
Upvotes: 1
Views: 11634