DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Listbox: Max number of items

  1. #1
    Dave McGill Guest

    Listbox: Max number of items


    I have a client who wants to put 50,000 records in a listbox. I told him
    this is not recomended but he insists. I tried loading the records into
    a listbox but received an error at record 32737. I search MSDN and there
    is no information on max records for listboxes. Is 32737 the limit? Thanks
    for the help.

  2. #2
    Kenny Acock Guest

    Re: Listbox: Max number of items


    Dave,

    >I have a client who wants to put 50,000 records in a listbox. I told him
    >this is not recomended but he insists. I tried loading the records into
    >a listbox but received an error at record 32737. I search MSDN and there
    >is no information on max records for listboxes. Is 32737 the limit? Thanks
    >for the help.


    First, I agree with you that this would not be a good idea. You can quote
    me on that.

    It may be possible, however, to fake it. You could use a list view (which
    will hold more than enough items) and load the data as it is requested.
    (This would avoid a slow population process, and would only show the data
    that is needed.)

    --Kenny

  3. #3
    Luther Miller Guest

    Re: Listbox: Max number of items

    I agree with your client, that in some cases, this is desirable.
    (I also agree that in many cases it is not appropriate. But lets separate
    technical design from user interface design here for a minute... if SQL
    Server couldn't handle more than 32000 records in a table, would you tell
    people that they shouldn't have more than 32000 records in a table anyway,
    without knowing why they wanted to?)

    How does your newsreader handle displaying the list of Newsgroups when you
    select "ALL"? What if you have more than 32000 newsgroups (many servers do)
    and you want to scroll through the entire list? Well too bad, because
    someone at Microsoft forgot to update the List control in VB to use a Long
    instead of an Integer when they went to 32-bit many years back... The real
    list control behind the scenes can handle it, its a VB version limitation in
    setting the property. Thanks guys.

    (gee, can you tell I have an opinion on this issue?)

    Like suggested by someone else you will need to build your own usercontrol
    that is basically a view (it will appear faster to the user anyway) on your
    data. Or buy a 3rd party control or use a grid etc.

    "Dave McGill" <djm@ggs.com> wrote in message
    news:3ad46bef$1@news.devx.com...
    >
    > I have a client who wants to put 50,000 records in a listbox. I told him
    > this is not recomended but he insists. I tried loading the records into
    > a listbox but received an error at record 32737. I search MSDN and there
    > is no information on max records for listboxes. Is 32737 the limit?

    Thanks
    > for the help.




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center