0

Just like clicking on the listviewitem by hand, and it turns blue.

1
  • Show what you have tried. show what your code looks like - that way we can help you. Commented Apr 9, 2013 at 8:36

2 Answers 2

1

Set selected property of the listview item to true.

myListView.Items[indexNumber].Selected = true;
myListView.Items[indexNumber].Focused = true;
Sign up to request clarification or add additional context in comments.

Comments

1

Go this way:

Listview lv = new ListView();   // Maybe lv.MultiSelect = false  

// Add your items

lv.Items[<index>].Focused = true;

1 Comment

Hi, I tried this, the Item is selected but not highlighted, still white.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.