CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: ListView

  1. #1
    Join Date
    Apr 2001
    Location
    Chicago, IL
    Posts
    27

    ListView

    Does anybody know what changes I have to make to the code below so that the first column in the list view does not print? Thank you.

    For intColumn = 0 To mrsSelect.Fields.Count - 1
    Set colNew = lvwDisplay.ColumnHeaders.Add(, ,
    mrsSelect(intColumn).Name)
    Next intColumn
    lvwDisplay.View = lvwReport

    mrsSelect.MoveFirst

    intRow = 1
    Do While Not mrsSelect.EOF
    Set itmx = lvwDisplay.ListItems.Add(intRow, , mrsSelect.Fields(0))
    For intColumn = 1 To mrsSelect.Fields.Count - 1
    itmx.ListSubItems.Add , , mrsSelect.Fields(intColumn) & " "
    Next intColumn
    mrsSelect.MoveNext
    intRow = intRow + 1
    Loop


    Archie Kantzavelos


    Archie Kantzavelos

  2. #2
    Join Date
    Jan 2000
    Location
    MO, USA
    Posts
    1,506

    Re: ListView

    When you're done filling the listview, try just setting ListView.ColumnHeaders(1).Width = 0. That should hide it.

    is that what you're looking for?

    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
  •  





Click Here to Expand Forum to Full Width

Featured