473,405 Members | 2,261 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,405 software developers and data experts.

Selected Row ListView

I have gotten my ListView populated, almost broke my arm patting myself
on the back. Now I am not able to find out how to return information
from a row that has been selected. I have searched and searched, this
link seems to have somethings that should help me:
http://www.experts-exchange.com/Prog..._21891615.html
But when I try using ListView1.SelectedItems(0).Item(0).Text, I get an
error of Specified argument was out of the range of valid values.

I have the properties of the ListView set:
lsvTest.CheckBoxes = True
lsvTest.FullRowSelect = True
lsvTest.GridLines = True

Any help would be appreciated, thankfully I am already bald so that I
am not pulling my hair out over this.

Scott Moore

Sep 8 '06 #1
1 1230
On 8 Sep 2006 09:34:45 -0700, "samoore33" <sa*******@gmail.comwrote:
>I have gotten my ListView populated, almost broke my arm patting myself
on the back. Now I am not able to find out how to return information
from a row that has been selected. I have searched and searched, this
link seems to have somethings that should help me:
http://www.experts-exchange.com/Prog..._21891615.html
But when I try using ListView1.SelectedItems(0).Item(0).Text, I get an
error of Specified argument was out of the range of valid values.

I have the properties of the ListView set:
lsvTest.CheckBoxes = True
lsvTest.FullRowSelect = True
lsvTest.GridLines = True

Any help would be appreciated, thankfully I am already bald so that I
am not pulling my hair out over this.

Scott Moore
A populated ListView Row consists of n number of Item.SubItems:

Private Sub Listview1_ItemSelectionChanged(ByVal sender As Object, ByVal e As _
System.Windows.Forms.ListViewItemSelectionChangedE ventArgs) Handles Listview1.ItemSelectionChanged

Dim MyFirstItem As String = e.Item.SubItems(0).Text
Dim MyNextItem As String = e.Item.SubItems(1).Text

End Sub

Gene
Sep 8 '06 #2

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

Similar topics

2
by: Sam Johnson | last post by:
H how can I SET the selected item in a listview control Thank Sam
0
by: LV | last post by:
Hello, I would like to manually set one of my list view items as selected. When this item is set, I would like for a method to execute. I have a delegate on the list view for SelectedIndexChanged....
7
by: GTi | last post by:
I have a listview that with selected items. But I want to "reselect" items after a refresh. Each items have a uniqe value in the Tag object. After a refresh some new items may be added or removed...
2
by: billyb | last post by:
My listview has two columns: Email Address & Email Address Type. I've figured out how to populate it, but now I'm having trouble figuring out how to properly use the SelectedItems to get at the...
2
by: Niels Jensen | last post by:
Hi all, I have a listview and a textbox. when I select a row in the listview I want to be able to click on the textbox and type in some details. This obviously works fine - however when I...
1
by: LagartijaNick | last post by:
Question: I have a ListView in which I'm selecting a ListViewItem based on the value of a textbox. On my XP machine (with default color scheme) the ..Selected row is a noticable grey (back color...
6
by: George | last post by:
Hi all, How can I get the value stored from the selected item and subitems of a listview? Thanks in advance, George
1
by: =?Utf-8?B?TWFyayBDb2xsYXJk?= | last post by:
Hello I've added a listview to my WinForms C# 2.0 application. The listview is displayed in Details view and has the FullRowSelect property set to true. I'm using the listview control like a...
4
by: Bill-R | last post by:
I'm trying to convert a vb6 program to vb.net (vb2008 express) I have text data in a Listview Control I use a Textbox to enter characters to search the Listview When a Match is found, I use...
0
by: =?Utf-8?B?TWlrZSBDb2xsaW5z?= | last post by:
I have a listview that when I select an item, it populates a details view. I want to show the item that was selected in the listview by changing it to yellow. Trouble is, the selected item does not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.