Solved

Selecting with Listview

Posted on 2001-08-06
3
154 Views
Last Modified: 2010-04-06

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    
0
Comment
Question by:jexd99
3 Comments
 
LVL 3

Accepted Solution

by:
Slavak earned 100 total points
ID: 6358545
ListView.Selected.Index will return the row number
0
 

Expert Comment

by:comptebidon81
ID: 6361329
And set RowSelect to True...

GunDamn
0
 

Author Comment

by:jexd99
ID: 6362195
Wow that was easy, I'm embarassed to say how long I spent trying to figure this one out! :-)
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question