Click here to Skip to main content
15,906,567 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using listbox in VS2005 i have 4 feilds in table.i am bind only 1 feild in listboxitem is 3000 but when i update it on the selected value for select this on the view click event it takes more time if i have in listbox only one item then it's takes small bit time why ?. what i do for this when my list has 3000 record is maintain and it take samll bit time on update mode.
Posted
Updated 3-May-11 2:57am
v2
Comments
walterhevedeich 3-May-11 5:42am    
Perhaps you may want to rephrase your question because its not clear.
Manfred Rudolf Bihy 3-May-11 6:18am    
You may want to try with google translate. As it stands your question does not make very much sense.

1 solution

First, I presume this is all in WinForms (not ASP.NET or anything else, though the issues might be similar).

I think you are saying that if you populate a list box with one item only it is quick, but if you need to populate it with 3,000 items it is very slow.

To a certain extent that is inevitable and the only way round it is to redesign what you are doing so that you have a smaller number of items in your list box.

I occasionally hit this and tend to live with it the FIRST time a list is populated - but then take manual control over any updates / changes so that it isn't repopulated from scratch after every change on a form - I just add / remove any items that have changed (which is then quick if there have been few changes to make).

Alternatively, you might want to check that whatever you are binding to isn't slowing things down - e.g. if you are binding to an underlying database query, have you added appropriate indices to your tables to ensure that the query runs fast?

Hope this helps.
 
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