Live Chat Icon For mobile
Live Chat Icon

When I call ListViewItem.Selected = true;, why doesn’t the item get selected

Platform: WinForms| Category: ListView

Make sure the ListView has focus when you set the Selected property. For example, if this code is in the click handler for a button, this button will have the focus, and the selection in the list will fail. Just set the focus back to the list before you set the Selected property.

Share with

Share on twitter
Share on facebook
Share on linkedin

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.