ListView and select item

  • Thread starter Thread starter Giang Pham
  • Start date Start date
G

Giang Pham

Dear all,
When I add one row in my listview (type : details), I want to set it as
selected.
How could I do this ?
Thank you a lot.
 
Hi Giang,

There is a selected property on the ListViewItem:

ListViewItem item = new ListViewItem("myItem");
view.Items.Add(item);
item.Selected = true; //set listitem to selected

Good luck,

Ward
 
Back
Top