capturing the index of selected row of  listview

Posted on 2010-11-18
Medium Priority
Last Modified: 2012-05-10
I need the code for capturing the slected row index of a listview for vb.net
I am using VS2003
Question by:vbstudent9
  • 2
LVL 10

Expert Comment

ID: 34170769

private void ListView1_SelectedIndexChanged(object sender, EventArgs e)
     if (ListView1.SelectedIndices.Count <= 0)
     int intselectedindex = ListView1.SelectedIndices[0];
     if (intselectedindex >= 0)

Open in new window


Author Comment

ID: 34170789
is it for vb.net
LVL 10

Accepted Solution

hosneylk earned 1000 total points
ID: 34170802
oh yeah.. sorry. just use this

Open in new window


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.

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.

Join & Write a Comment

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
From store locators to asset tracking and route optimization, learn how leading companies are using Google Maps APIs throughout the customer journey to increase checkout conversions, boost user engagement, and optimize order fulfillment. Powered …
Watch the video to know the simple way to remove or recover or reset lost or forgotten passwords of Outlook PST file. With Kernel Outlook Password Recovery tool such operation is very easy to perform. It is a freeware with limitation to use with 500…

600 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