Results 1 to 3 of 3

Thread: Hiding listview columns?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2001
    Posts
    148

    Hiding listview columns?

    Using the method of setting the width of the column to 0 then subclassing as described on http://www.vbforums.com/showthread.p...ighlight=cool, I was able to "hide" a listview collumn in vb6 without any problems, HOWEVER even with the upgrade wizard I cannot for the life of me get that code working in .NET.

    Anyone here gotten it working, know how to get it to work, or know a completely different way that works? Thanx.

  2. #2
    Registered User
    Join Date
    Nov 2002
    Location
    Växjö, Sweden
    Posts
    314
    I often work with datasets that I display in listviews, and as that is so fast compared to get the data each time from a database I started to clear the listview and reload it with a new set of columns each time in .NET......

    This works good if your not loading more than 200-300 records and if you use the ListView.BeginUpdate and Listview.EndUpdate to get rid of flicker. (As I see it it's seldom good manner to fill a listview with alot more than 300 record anyway, because its to much for the user to scroll through).

    I don't know if your filling it with data from a database at all, but maybe this helped anyway....

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 2001
    Posts
    148
    Originally posted by Athley
    I often work with datasets that I display in listviews, and as that is so fast compared to get the data each time from a database I started to clear the listview and reload it with a new set of columns each time in .NET......

    This works good if your not loading more than 200-300 records and if you use the ListView.BeginUpdate and Listview.EndUpdate to get rid of flicker. (As I see it it's seldom good manner to fill a listview with alot more than 300 record anyway, because its to much for the user to scroll through).

    I don't know if your filling it with data from a database at all, but maybe this helped anyway....
    No, Im not using a database but I did think of reloading the listview, would a collection be the best way to store the data?

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