Click here to Skip to main content
15,887,267 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In a listview control, I have a textbox which I want to use autofiltering in. For instance, if I enter kis into the textbos then I would expect that all records that start with kis would be displayed (similar to the way that Google autofiltering works). Does anybody have any pointers on where I should start?
Posted
Updated 23-Oct-10 1:33am
v2
Comments
OriginalGriff 23-Oct-10 6:14am    
What have you tried?
Sandeep Mewara 23-Oct-10 6:34am    
Heard of Autocomplete/Autosuggest feature?

1 solution

You need to handle the TextChanged event for the textbox control, and in that event handler, perform a linq query on your dataset to find all entries that start with whatever letters have been typed, and put them in the listbox.

Keep in mind that this is only going to practical if your dataset only has a small number of records.
 
Share this answer
 
v2
Comments
Nish Nishant 23-Oct-10 8:59am    
My vote of 5. Propose this as the answer.
krishna kishore58 26-Oct-10 1:37am    
can u suggest me with answer..moreover i dont have listbox in my app. suggest me with appropiate code soon..

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