DiigIT | IT Community
No Profile Image
Welcome Guest
New User? Register | Login

Objects in Control(Combobox)

By: rekha singh | 08 Apr 2010 11:33 am

In my project, I have to fill more then 10,000 custom class objects in combobox.

 
While filling these objects, the application is not responding to user. Also, the objects get fill each time for different selected createria.
 
I want to know that, Is there any way to fill these objects in combobox while the user continue his work (on combobox also)?
 
Please help!
 
Thanks
 

Comments

I'd more be questioning why you want to put 10,000 objects into a combobox than how to do it. Might be better to look at your design and find a more selective way of filtering what's presented to the user.

  

By: rekha singh | 08 Apr 2010

My project is for Medical Store that purchase and sale thousands of medicines per day.I categorize this medicines on the bases of there types like, syrup, tab., etc.But still there are thousands of items with same type and  different name.And now its not possible to furthur categorize these items on any thing.

By: rekha singh | 08 Apr 2010

I did the same.

But after typing tab or syp. the items(objects) are still in thousands.

To avoid loading again & again, I localized the items list in an Array and filling objects from this array on typing tab, syp, etc.

By: rekha singh | 08 Apr 2010

 Assuming they're coming from a database, paging the results would perhaps be better than loading them all in one hit.

By: rekha singh | 08 Apr 2010

 Thanks

I will try this solution but its good for me if there is any other solution for loading these objects without effecting speed of work.

By: rekha singh | 08 Apr 2010

Solution is limit your select query with TOP 100 records only.
While user will continue to type finally he will get less then 100 results, it will be easy for him to find in 100 records.
It will be difficult for him to find product in more then 1000 records.

 

Regards,

By: rekha singh | 08 Apr 2010
What use to the user to attempt to display that huge # of options to pick from. 
 
If you show me 10,000 books at Amazon.com, I would find another book seller. 
 
 Do you have a cross reference in your data for the product to what it treats?  That may be what you need to create first, and they put a few controls to help the user LIMIT the presentation. 
By: rekha singh | 09 Apr 2010
During form load i localised the data in array and fill combo box on change of option.
 
I do this because the application can also work on remote server(assuming the network speed is slow)
 
But searching and filling of data from array takes time due to checking of condition.
 
I tried to get data direct from DB and set the data source, and found that it is fast then above approach. But as I said the network may be slow in case of remote server then this option will take much more time then above approach.
 

When I tried to fill combo box on separate thread then it gives error because during filling time we can not type anything in combo box. 

By: rekha singh | 09 Apr 2010

In that case load dataset only once and then apply filter to dataset. It is equivalent to query to database but it will be done offline.

 

Regards,
 

By: rekha singh | 09 Apr 2010

Leave a comment

Enter the text in the image
img
Can't read?
Type the characters you see in the picture below.


Close Move