Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I want to create a new combobox Control which want to list different disease symptoms

It have to

1) select a single item from a collection of data of minimum 1000 entries.
2) Cant load the entire data at the initial stage so want to provide pagination to select a set of data.
Posted
Updated 16-Jun-14 2:54am
v4
Comments
ZurdoDev 16-Jun-14 8:40am    
Where are you stuck?
Member 10605096 16-Jun-14 8:44am    
how want to make it look and behave according to my need.
ZurdoDev 16-Jun-14 8:45am    
I'm stuck there too because I have no idea what your question is.
Debabrata_Das 16-Jun-14 8:50am    
Hello friend, first of all Combobox or DropDownList control is not a preferred control when you are expecting 1000 items to be displayed. May I ask you what kind of data you're going to display in the control?
- DD
Sergey Alexandrovich Kryukov 16-Jun-14 8:51am    
1) You did not describe what this controls should do exactly; 2) It's not clear why you could possibly call it "ComboBox"; 3) Not clear what your problem is; you can design any control you want; did you try?

"Can anyone...?" is not a valid question. "Anyone" is such a skilled person, no need to ask if he can. :-)

—SA

As has been mentioned in the comments, a combo box is not the way to go. There is just too much work for the user trying to page down through 1000+ entries. I don't know if your selection is going into a grid cell, or you are using a full screen, but either way I'd recommend that you allow your user to do selection using a grid. When they click to select a new value, bring up a simple form with a grid on it. That will allow them to see more than just the value they are selecting (which will help them make a better choice) and will allow them to sort and search on different properties associated with the disease.

Once they make their selection, just pop it into the grid or control on your primary screen.

If there is some reason that you feel you *must* use a combo box, then you need some way of getting your data in bite sized chunks. For example, if you decide that 50 items is the maximum that you want in your combo, use a "top/first 50" to get your first chunk of data. Keep track of what the index value is for the last record.

For example, let's say you are getting them indexed on a numeric ID. You get the top 50 records and the last record is #50. Now, in order to get the next "chunk" of data" you query the DB for "top 50 where ID >= 50 sort on ID" (you want to include the previous value in the subsequent pages, see below for reason). And so on.

Now you need something to trigger the pagination. Maybe when the user selects the last value in your current 50 "page", you could query for the next 50 and rebind to the combo box (with the same #50 selected), so that they could scroll to the bottom, select, then select again for the next 50.

Really clunky and I wouldn't recommend it, but there it is.
 
Share this answer
 
v4
instead of combo box, do consider alternative AutoSuggest and AutoComplete control in WPF
[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900