Results 1 to 2 of 2

Thread: How to add multiple rows in a ListView

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2000
    Location
    Atlanta, GA
    Posts
    177

    Angry 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

  2. #2
    Fanatic Member ahara's Avatar
    Join Date
    Nov 2003
    Location
    Toronto
    Posts
    531
    add this line of code:

    VB Code:
    1. 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
  •  



Click Here to Expand Forum to Full Width