Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / January 2005

Tip: Looking for answers? Try searching our database.

Combobox with many values

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Becker - 05 Jan 2005 00:35 GMT
I have a need for a simple combobox on a form in one of my programs that
represents city, state.  I want to have it autocomplete as the user types.
I have a table with these values (about 50k of them) and I'd like to source
it from there.

I have seen some methods out there for the autocomplete, but I think that
pulling 50k in the combobox might be too slow at runtime to build a table of
all those records and then bind the entire combobox to the 50k source.  It
is ok that they type a character or two and then it dynamically build a
combobox and start the autocomplete process.

What is the recommended method of doing something like this?  Is 50k records
for a combobox source excessive?  How have others gotten around this
efficiently?

Thanks,
Ben
Cor Ligthert - 05 Jan 2005 10:10 GMT
Becker,

Assuming you are from the US than I would recomend two comboboxes one with
state and one with citys which you load dynamicly depending on the state.

This is by the way in my opinion the most used sample when you google for
that.

I hope this helps?

Cor
Carlos J. Quintero [.NET MVP] - 05 Jan 2005 10:39 GMT
You can use filtering to reduce as much as possible the number of items in
the city combobox. For example, you can have 2 comboboxes, one for states
and other for cities of the selected state in the first combobox. When the
state selected changes, the combo with cities is filled.

Signature

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com

>I have a need for a simple combobox on a form in one of my programs that
>represents city, state.  I want to have it autocomplete as the user types.
[quoted text clipped - 13 lines]
> Thanks,
> Ben

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.