Click to See Complete Forum and Search --> : List View Click event


dky1e
June 19th, 2002, 04:47 PM
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?

dky1e
June 20th, 2002, 08:25 AM
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!