Whenever a user clicks on a listview, entire row is selected.
How can I get at the row number they selected and the text in the rows?
Printable View
Whenever a user clicks on a listview, entire row is selected.
How can I get at the row number they selected and the text in the rows?
private void listView1_DoubleClick(object sender, System.EventArgs e)
{
for (int i = 0; i < listView1.SelectedItems.Count; i++)
{
ListViewItem nextItem = listView1.SelectedItems[ i ];
// do what you need to do with nextItem
}
}
easy!