Find the selected list item
3 answers
To get the selected list item try this:
int index = 0;
if (this.myListView.SelectedItem.Count> 0)
index = this.myListView.SelectedIndices [0]
This will give you the index of the selected item in the list.
You can also refer to this:
http://www.neowin.net/forum/index.php?showtopic=358458
+1
source to share
I really don't know what you mean here. Could you please explain your problem further or provide some sample code?
To get the selected row in the ListView, you use the ListView.SelectedItems property. ListView.SelectedItems [0] will give you the first selected item (as there can be more than one item selected)
0
source to share