Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Using winForms i doing the AutoCompleteStringCollection in form_load.
set the database information to List(Of String) variable, after that assigning it to AutoCompleteStringCollectionSource.

but what should i do if i have big data source.

Thank's
Posted

1 solution

If you have a lot of rows then:
- wait for the user to input some characters perhaps 3 to 4 before listing the choices starting with those characters
- do not show everything at once, perhaps just 50 first rows and have the user ability to show more.
 
Share this answer
 
Comments
[no name] 16-Feb-15 8:51am    
yes thought about this, but in this case the user must to know the first 3 or 4 characters and its makes the autocomplete not so useful... plus everytime fill the list from the db is ineffective.
Wendelius 16-Feb-15 23:43pm    
That's true that the user needs to know few characters, but why would you fetch the data from the database each time? Just store it on the client side, for example in a datatable and select appropriate portion each time you need one. Having a database call in this kind of situation would be a performance killer.
[no name] 17-Feb-15 1:28am    
That's what i doing today but the problem is if in the future the database will be much larger the storing to the datatable will be ineffective and will take lot of time.
Wendelius 17-Feb-15 1:40am    
It sounds like auto complete may not be the right solution in this case. If the amount of the data rows is so big that it takes too much time to fetch it, how would a user be able to select from the list?

Perhaps you should consider some mechanism to narrow the possibilities, peharps some more input from the user...
[no name] 17-Feb-15 1:43am    
Ok, thank you.

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