Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
83
How to add items manually in combobox.
posted

I have collection of object,which contains 6-7 properties.Collection having over 30,000 records.If i go by giving collection to the datasource of combobox,then it will tell lot of time,as it will represent it as a grid.then i have to hide some column and ...inshort this process will take lot of time.Instead of this i want to add 30,000 records manually,by adding combobox.item.add(key,value),or something like that.

I read in the forum,there you cannot add items manually,you must have to give datasource.

Can you suggest me anything(like dictionary etc...) that will take less time to process?

 Thanks,

Jay Parikh.

Parents
  • 469350
    Verified Answer
    Offline posted

    Hi Jay,

    I doubt that copying the data from a Collection into some other structure will save you any time. In fact, it will probably just take longer because you not only have the binding time, but you are adding the time it will take to copy the data. 

    Binding a ComboBox to 30,000 items shouldn't really take that long. Have you explored why it's taking so long?

    In any case, it's not really a good idea, because no user I have ever known will be able to deal with a list of 30,000 items. Scrolling through such a huge list wouldn't be very useful to anyone. Perhaps what you need to do is implement some kind of filtering mechanish where the list only contains a certain sub-set of the data at any one time. Perhaps you cold give the user a choice of categories and then populate the list based on the category they chose. I don't know your application or the data you are dealing with, so I don't know if that will work, of course. 

Reply Children