-
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!!!
-
Re: Report List View?
Maybe you should use the function GetItemText()
-
Re: Report List View?
OUPS!!!!
sorry I tought I was in VC++ forum
I was wandering where that function came from. lol
Good luck
-
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