Please help with filtering observablecollection using checkboxes
Hello. i am very new to wpf and entity framework and I've ran into a snag...I'm using ado.net entity data model. i have an entity, generated from a database.... BoxEntity. this entity is made up of the tables in my database. there are 8 tables total.
1 parent table, that is my:
<CollectionViewSource x:Key="RcViewSource" />
7 of the tables in my BoxEntity are child tables. these are my :
5 of the tables/views (shown above) are all checkboxes/ booleans/ true/false answers, no input required but check a box for true, leave it blank for false.
I tried to find another way to do it, but they are all yes/no columns. And i didn't want to use RadioButtons, just not fond of the way they look.
so... I need to sort/filter the main view (RcViewSource) by the other 5 views. so i have a window something like this:
and if the user selects Appetizers, Breakfast, and Vegan..... all the recipe names containing those 3 items will show up in the listbox when they hit the "Search" button.
I"ve attached a copy of my SearchMe.xaml.vb code behind. As you can see I hard coded the button to search for Appetizers when clicked, but their has to be an easier, more efficient way to do the filtering.
I've also attached a copy of my RecipeList, this is my ObservableCollection, as you can see I'm very lost.. And their are NO resources on the web dealing with checkbox bindings, unless you want to change the color of the text .....
Last thing is I need to pass the value of the Item Selected to another window to display the actual recipe.
Or... If there is a way I could write a SQL stored procedure to do all the above that would be great also.....
This has been giving me problems for about 3 months now. Please someone help....
Any and all input or suggestions would be extremely appreciated...
Thanks, Adam RecipeList.txt SearchMe-form.txt
Visual Basic.NETMicrosoft SQL Server 2008VB Script
8/22/2022 - Mon
Your help has saved me hundreds of hours of internet surfing.