Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Selecting with Listview

Posted on 2001-08-06
3
Medium Priority
?
175 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 3

Accepted Solution

by:
Slavak earned 400 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

719 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