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.
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.
Hi Mike,
It is not taking time to bind the data.It is taking time to display those data,as it will prepare grid for 30,000 rows with 6-7 columns.I have check that if i am binding 1000 records then its coming very quickly.So,its all about records(i mean Grid).May be i can use another control which supports adding items manually?not sure.
The scenario you told me to divide it in category or something is not possible in my application.
Thanks for the reply.
I will check further,what can be the solution.
jaysparikh said:It is not taking time to bind the data.It is taking time to display those data,as it will prepare grid for 30,000 rows with 6-7 columns.I have check that if i am binding 1000 records then its coming very quickly.So,its all about records(i mean Grid).May be i can use another control which supports adding items manually?not sure.
I don't understand what this means. You mean it takes time the first time you drop down the list? How exactly are you making the distinction between binding and displaying?
If it's a question of the Combo processing the data, the only thing I can think of that might cause a delay like this is the DropDownSearchMethod property. By default, the Combo does binary searching. But this means that it has to build a sorted list of the DisplayMemmer column values. So try switching this property to linear. This will slow down searching the list, but it will improve the initial load time of the control, so it's a trade-off.
I'm new to Infragistics and I'm trying to learn how to use some of the controls. Is there a way to add items to the ultracombo like with the Microsoft combo? Ex:
Combobox1.Items.Add("String");
Or, can you only add items to the ultracombo by using a datasource?
Is there a book that contains more information on the Infragistics controls?
Thanks in advance.
I'm sorry, but I do not understand your question.
which is the the better way to add items manually that is type of data source with some more detal... thanx.
ctp59 said:But an ultracombo is different from a ComboBox!!!
Yes, it is different. What's your point? :)
But an ultracombo is different from a ComboBox!!!
UltraCombo requires a data source.You can use any object which implements IList or IBindingList as the data source, though. So you could use a DataTable, a List<T>, a BindingList<T>, and UltraDataSource, or many many other objects for your data.
If you don't want to do that, then I recommend using the UltraComboEditor instead of UltraCombo. The UltraComboEditor is a simpler, single-column combo, that more closely resembles the Microsoft ComboBox.