|
-
July 6th, 2000, 10:34 AM
#1
Report List View?
I am using a listview (Line_Type) with 2 columns and X amount of rows. When I go to save this table I use:
for Count = 1 to Line_Type.ListItems.Count
Write #9, Line_Type.ListItems(Count).Text, Line_Type.SelectedItem.SubItems(1)
next Count
The problem is that it will grab all the different fields in column 1 but it only takes column 2's row 1 info. For example:
MY TABLE:
___________
A | B
C | D
E | F
G | H
I | J
The text output file looks like this:
"A","B","C","B","E","B","G","B","I","B"
I want to have it look like this:
"A","B","C","D","E","F","G","H","I","J"
Thanks for any advice!!!
-
July 6th, 2000, 10:44 AM
#2
Re: Report List View?
Maybe you should use the function GetItemText()
-
July 6th, 2000, 10:51 AM
#3
Re: Report List View?
OUPS!!!!
sorry I tought I was in VC++ forum
I was wandering where that function came from. lol
Good luck
-
July 6th, 2000, 11:21 AM
#4
Re: Report List View?
your code is using the selected item for the second item, when really it should be iterating through the collection like yuo are doing for the rows...
'your code:
for Count = 1 to Line_Type.ListItems.Count
Write #9, Line_Type.ListItems(Count).Text, Line_Type.SelectedItem.SubItems(1)
next Count
'change the second line to
Write #9, Line_Type.ListItems(Count).Text, Line_Type.ListItems(Count).SubItems(1)
that should do it.
hope this helps,
John
John Pirkey
MCSD
http://www.ShallowWaterSystems.com
http://www.stlvbug.org
John Pirkey
MCSD (VB6)
http://www.stlvbug.org
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|