473,395 Members | 1,694 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,395 software developers and data experts.

Selected item? Possibility of subitems???VB.net

115 100+
Hi
I don't really have a problem as there are more than 1 way to do things in programming, i would just like to know if another way i am thinking is possible.

I have a list view (listview1) with data in 5 columns

When i double click i fire an event to find what i have clicked on.

I was wondering is it possible to use the selecteditems.item to get the text in column 2 4 and 5. In other words the subitems. I have only ever retrieved selected items within the first column.
[code]
Car = carListView.SelectedItems.Item(3).SubItems.ToStrin g
[code]
This seems to give me an error.Am i on the right lines? any comments and input are hugely appreciated

Truez
Nov 11 '08 #1
1 1222
truezplaya
115 100+
no problems i managed to figure it out, If any one is interested then this is the code
Expand|Select|Wrap|Line Numbers
  1.  car = carListView.SelectedItems.Item(0).SubItems.Item(1).Text
  2.  
Nov 11 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Ash Jones | last post by:
I trying to do nested items in a collection. I've got an item which one of the properties is subitems, which is a collection of item. can do the root level but if i do a subitem at design time i...
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...
3
by: n. Smith | last post by:
Hi All, Is it normal that the ListView fires the selectedinexchange event twice? I have a LvLoaners list view item that updates 3 text boxes (code below), when I click on an item. I have set...
3
by: Steve Long | last post by:
I hope this isn't too stupid of a question but I'm looking for a way to change an item in a listview control when the mouse moves over it. I'd like to change its color and underline it for a...
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
7
by: Mike Johnson | last post by:
How do I remove a item that's been selected from a listview? I'm using Visual Basic 2005 express edition. Thanks
1
by: samoore33 | last post by:
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...
1
by: Se0ng | last post by:
hi, I'm new to vb.net and I need some help, I done a backcolor change to my list view item as below code, Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)...
6
by: iDesmet | last post by:
Good day! I was wondering if someone could show me the way with this little problem I have. I need to get the value/text of every checked SubItems in a listview so I can execute a Sub. The...
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
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
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...

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.