|
-
May 6th, 2004, 01:07 PM
#1
Thread Starter
Addicted Member
How to add multiple rows in a ListView
This is the code I am using to add information to the ListView, how do I get the text to be placed on multiple rows? Right now the code populates the ListView on one single row until it is forced onto another row. Thanks in advance for any help.
Dim j%, k%
Dim l As ListItem
'Add the ListView ColumnHeaders
For j = 1 To 2
ListView1.ColumnHeaders.Add , , _
"Column " & CStr(j), 1000
Next
For j = 1 To 2
'Add a ListItem
Set l = _
ListView1.ListItems.Add(, , "Item " & CStr(j))
Next
Last edited by Doc Scheinder; May 6th, 2004 at 01:13 PM.
212 will lead you to the truth
-
May 6th, 2004, 02:41 PM
#2
Fanatic Member
add this line of code:
VB Code:
ListView1.View = lvwReport
I am assuming you want rows (like a data grid)...if not, post back and let me know.
cheers
"Knowledge is gained when different people look at the same information in different ways"
- Louis Pasteur
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
|