By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,361 Members | 2,168 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,361 IT Pros & Developers. It's quick & easy.

ListView and select item

P: n/a
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.
Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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

Giang Pham wrote:
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.

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.