473,387 Members | 1,575 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

how to get row number when clicking on a listview

Hi,

I'd like to know the easiest way to get a row number when clicking on a
listview.

Thanks

Nov 21 '05 #1
1 3141
On Thu, 21 Oct 2004 05:05:02 -0700, "Li Pang"
<Li****@discussions.microsoft.com> wrote:
Hi,

I'd like to know the easiest way to get a row number when clicking on a
listview.

Thanks


Private Sub ListView1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles ListView1.Click

If ListView1.SelectedItems.Count = 0 Then Exit Sub
MsgBox(ListView1.SelectedItems(0).Index.ToString)

End Sub

Hope this help

Blu
Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: | last post by:
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.
4
by: Jonathan | last post by:
Hi, I have a listview with many rows init. The first column is "No." which shows the row number in the listview. When a user selected a row and delete it, say row 3. I want to organise the...
2
by: Randall Arnold | last post by:
I'm trying to fire the ColumnClick event for a Listview control remotely. Problem is, I'm not sure what parameters to pass. Here's the sub header for the event: Private Sub...
0
by: Eric | last post by:
Visual C++ 2005 Express MVP's and experience programmer's only please!... I need to get the number of lines in a textbox so I can insert them into a listview. The text comes from my database...
0
by: Eric | last post by:
Visual C++ 2005 Express MVP's and experience programmer's only please!... I need to get the number of lines in a textbox so I can insert them into a listview. The text comes from my database...
2
by: Ben H | last post by:
Hello all I'm using a listview in my app but I want to scroll the listview programatically as I hate the look of the standard scrollbar. So, the listview is scrolled programatically using...
1
tbarto
by: tbarto | last post by:
Hi For some time I've been working on an application that may be able to find a specified item in ListView ( WinAPI ). It is possible to get some item using e.g LVM_GETITEM message and LVITEM...
2
by: =?Utf-8?B?SXJmYW4=?= | last post by:
Hello, It may be a repeated question but I don't find the solution to the situation that I encounter in it. My application is monitoring another application that is built in VB6. The...
0
by: MrColeyted | last post by:
I am designing an app that is similar to Windows Explorer. I have all working well. By clicking a directory in the treeview, the folders and files for that directory are displayed in the listview....
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.