Selecting with Listview


If I have a listview with 10 rows (items) listed in it, with an image on every row, and 4 columns across, how can I get the item number when the user clicks on any column or image. For example, if listview has columns named
field 1, field 2, field 3, and field 4, and they double click the field 4, the 3rd row from the top, I want to know that item[2] was chosen (starts at 0, so the 3rd row is item[2]).  In other words I'm trying to determine what row the user clicked no matter where he clicks.

         Thanks    
jexd99Asked:
Who is Participating?
 
SlavakCommented:
ListView.Selected.Index will return the row number
0
 
comptebidon81Commented:
And set RowSelect to True...

GunDamn
0
 
jexd99Author Commented:
Wow that was easy, I'm embarassed to say how long I spent trying to figure this one out! :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.