Solved

Selecting with Listview

Posted on 2001-08-06
3
147 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
Comment Utility
ListView.Selected.Index will return the row number
0
 

Expert Comment

by:comptebidon81
Comment Utility
And set RowSelect to True...

GunDamn
0
 

Author Comment

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

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now