Reputation: 13068
I am having a sample Silverlight app that contains a combo box with thousands of values(~4000). The values are pulled from the web service and populated currently, which takes a lot of time and renders the UI unresponsive.
The use case:
- A field in the UI needs to be populated by the user
- The field can have only certain predefined values(already present in the database)
- The values in the field cannot be grouped/categorized
What have you done or will do to:
- Make the UI more responsive when the values are getting populated in the combo box
- Populate the combo values as fast as possible
Thanks for reading!
UPDATE:
Great comments! Appreciated!
I have edited my post to present the use case.
The best alternative i could think of would be a Google auto-suggest-like textbox that suggests as i type-in.
Upvotes: 2
Views: 1295
Reputation: 3236
Can somebody please offer an alternative besides modal search instead of saying combo boxes dont work. What if the user doesnt know the values to search for? For example try this:
private void employeeUserNameTextBox_TextChanged(object sender,TextChangedEventArgs e) { Console.WriteLine("Hello"); //Execute a search like so var query= your stored procedure execution here. } very abstract solution but I hope you get the point.
Upvotes: 0
Reputation: 9203
Think about using popups to do a modal search to select the item the person wants. Let them enter some search criteria and show the results in a listbox which should hopefully be a more reasonable number.
Scrolling through 4000 items in ridiculous and the thumb on the scrollbar would be so touchy, it's basically useless.
You're making them search through thousands of items, let them actually SEARCH for it then in a dialog.
Upvotes: 8
Reputation: 16065
Well, personally I dont think a ComboBox with 4000 values is very user friendly, imagine selecting something from 4000 options...
Usually when i have large data like this I use paging.
Upvotes: 4
Reputation: 564691
I would avoid the entire situation in the first place -
I personally detest combo boxes with more than about 20 elements. At some point, choose a better user interface.
A combo box with 4000 elements makes for a horrific user experience. Redesign this to make it simpler for the user to find what they are looking for.
Upvotes: 10