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

Capturing the second column data from a list view box.

I am using a ListView control to display 2 columns of data that I
populate manually. I can get the data in the first column easily
enough. its when i try to get the data in the second column that I get
the problem. I am just not sure where to start? Is there a method
that lets me get this information easily?

TIM

Aug 16 '06 #1
4 3862
Tneufeld,

There is probably something wrong in your code.

It is really possible to populate the second column, however one of the
things you have of course to do is set the listview to detailview.

I think not that anybody can help you any further if you don't show how you
did it (and than only the relevant code).

I hope this helps,

Cor

<tn******@gmail.comschreef in bericht
news:11**********************@h48g2000cwc.googlegr oups.com...
>I am using a ListView control to display 2 columns of data that I
populate manually. I can get the data in the first column easily
enough. its when i try to get the data in the second column that I get
the problem. I am just not sure where to start? Is there a method
that lets me get this information easily?

TIM

Aug 16 '06 #2
I am not having a problem populating the second column. but later on I
need to get say the data in the second column of a checked item. that
is where I am hiaving the problems. I can get the first column ok. I
cant retrieve the information in the second column.

TIM
Cor Ligthert [MVP] wrote:
Tneufeld,

There is probably something wrong in your code.

It is really possible to populate the second column, however one of the
things you have of course to do is set the listview to detailview.

I think not that anybody can help you any further if you don't show how you
did it (and than only the relevant code).

I hope this helps,

Cor

<tn******@gmail.comschreef in bericht
news:11**********************@h48g2000cwc.googlegr oups.com...
I am using a ListView control to display 2 columns of data that I
populate manually. I can get the data in the first column easily
enough. its when i try to get the data in the second column that I get
the problem. I am just not sure where to start? Is there a method
that lets me get this information easily?

TIM
Aug 16 '06 #3
On 16 Aug 2006 00:35:42 -0700, "tn******@gmail.com" <tn******@gmail.comwrote:
>I am not having a problem populating the second column. but later on I
need to get say the data in the second column of a checked item. that
is where I am hiaving the problems. I can get the first column ok. I
cant retrieve the information in the second column.

TIM
Cor Ligthert [MVP] wrote:
>Tneufeld,

There is probably something wrong in your code.

It is really possible to populate the second column, however one of the
things you have of course to do is set the listview to detailview.

I think not that anybody can help you any further if you don't show how you
did it (and than only the relevant code).

I hope this helps,

Cor

<tn******@gmail.comschreef in bericht
news:11**********************@h48g2000cwc.googleg roups.com...
>I am using a ListView control to display 2 columns of data that I
populate manually. I can get the data in the first column easily
enough. its when i try to get the data in the second column that I get
the problem. I am just not sure where to start? Is there a method
that lets me get this information easily?

TIM
(VB2005)

If two columns then the second column item would be subitems(1):

Private Sub ListView1_ItemChecked(ByVal sender As Object, _
ByVal e As System.Windows.Forms.ItemCheckedEventArgs) _
Handles ListView1.ItemChecked
Me.Label1.Text = e.Item.SubItems(1).Text
End Sub

Gene
Aug 16 '06 #4
That doesnt seem to work. I am trying to get the subitem, but not
within any of the controls own routines. here is the code I have so
far.
For i = 0 To .lvAllItems.CheckedItems.Count - 1

If .lvAllItems.Items.Item(i).Selected Then

textbox1.text = txtProfileName & "," &
..lvAllItems.Items.Item(i).ToString & "," &
..lvAllItems.Items(i).SubItems
End If
Next
gene kelley wrote:
On 16 Aug 2006 00:35:42 -0700, "tn******@gmail.com" <tn******@gmail.comwrote:
I am not having a problem populating the second column. but later on I
need to get say the data in the second column of a checked item. that
is where I am hiaving the problems. I can get the first column ok. I
cant retrieve the information in the second column.

TIM
Cor Ligthert [MVP] wrote:
Tneufeld,

There is probably something wrong in your code.

It is really possible to populate the second column, however one of the
things you have of course to do is set the listview to detailview.

I think not that anybody can help you any further if you don't show how you
did it (and than only the relevant code).

I hope this helps,

Cor

<tn******@gmail.comschreef in bericht
news:11**********************@h48g2000cwc.googlegr oups.com...
I am using a ListView control to display 2 columns of data that I
populate manually. I can get the data in the first column easily
enough. its when i try to get the data in the second column that I get
the problem. I am just not sure where to start? Is there a method
that lets me get this information easily?

TIM

(VB2005)

If two columns then the second column item would be subitems(1):

Private Sub ListView1_ItemChecked(ByVal sender As Object, _
ByVal e As System.Windows.Forms.ItemCheckedEventArgs) _
Handles ListView1.ItemChecked
Me.Label1.Text = e.Item.SubItems(1).Text
End Sub

Gene
Sep 8 '06 #5

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

Similar topics

1
by: neelu | last post by:
I have four columns in listview. SR Number Part# DES Qty Weight 59 9410106800 Nut 10 0.03 60 90304ge800 Helmet 5 0.325 61 9635439604 ...
19
by: Owen T. Soroke | last post by:
Using VB.NET I have a ListView with several columns. Two columns contain integer values, while the remaining contain string values. I am confused as to how I would provide functionality to...
10
by: david | last post by:
Hi, all: I need a help from you about DataGrid control. I created a DataGrid, dg, in design view of .NET visual Stadio and use the builder to add a Hyperlink column to dg. I want to try to assign...
5
by: Nick | last post by:
Hey guys, I have 2 events on a windows forms datagrid, the mouse move as well as the double click events. What's happening is that when I double click on a row in the grid, the mouse move event...
13
by: nyt | last post by:
I have a problem of number and text field. I got the database file(mdb) that contains many combo boxes used and its list values are created by "value list" For eg field Field name= 'furniture'...
2
by: Joe Griffith | last post by:
I'm using a Win Forms Data Grid View control in unbound mode. When I add columns using the wizard the first item is the column name. Everything works fine. However, if you return to the...
11
by: surya | last post by:
hello sir, i have a table emp ,it has three fields one is empno int ,second is ename varchar(20). and last is salary , emp empno ename salary ----------- ------------...
3
by: Beowulf | last post by:
I was just messing around with some ad hoc views and table returning UDFs today so I could look at and print out data from a small table and noticed something strange. If I stick my select...
4
by: Lou O | last post by:
Is it possible to use the row (index) of a list box as control source Property for a text box? Example: Text1.ControlSource Property is set to "= List1.Column(0,2)" in design view. When I open...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...

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.