Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I have a listbox containing a data from sql. whenever the textbox is clear, all the items will be shown. when a user inputs a letter, it will filter the data inside of the list box.

im using wpf vb.net

how am i able to do this?

thanks.
Posted
Comments
Richard C Bishop 23-Aug-13 11:20am    
What have you tried?
hoyice 23-Aug-13 11:28am    
i'm still trying...

 
Share this answer
 
Comments
hoyice 23-Aug-13 11:43am    
how about in vb.net? this is c#
ridoy 23-Aug-13 13:35pm    
You can view it http://social.msdn.microsoft.com/Forums/en-US/4d0688eb-1fc0-4208-86f2-3f9086aa8358/please-help-filtering-listbox-based-on-textbox-text-in-wpf
ridoy 23-Aug-13 13:53pm    
You can view it http://social.msdn.microsoft.com/Forums/en-US/4d0688eb-1fc0-4208-86f2-3f9086aa8358/please-help-filtering-listbox-based-on-textbox-text-in-wpf
hoyice 23-Aug-13 22:01pm    
thanks. :)
ridoy 24-Aug-13 1:39am    
welcome,:)
If you are using MVVM, you can use a LINQ statement on the itemssource. The INotifyPropertyChanged will cause a refresh. Just have a sort, and have the binding update on property changed.
 
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