returning row number of listview row clicked

returning row number of listview row clicked

Post by » Tue, 02 Mar 2004 08:57:31

How can I know what row number I clicked on in a listview? I need a method
that returns an int corresponding to the row number I clicked on in my
listview.

Thanks.

 
 
 

returning row number of listview row clicked

Post by » Tue, 02 Mar 2004 14:20:59

I used the ListViewItem in double-click event:
ListViewItem LVI_empChosen = new ListViewItem();

LVI_empChosen = listViewEmployees.SelectedItems[0];

int rowChosen = LVI_empChosen.Index;



Thanks.

VM