Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Filtering through multiple ListView WPF

$
0
0


I am creating an application that consists of multiple patterns and frameworks which include, MVVM, Singleton pattern and entity framework within one WPF application.

My application consists of two aspects; A School and a Course. Due to the use of the singleton pattern, I have the following ViewModels; 

SchoolListVM -> SchoolVM -> CourseVm

I am trying to implement a simple `filter` to enable a user to search through a listview within my view, shown below.



As you can see, I have a filter to search through a the list of Schools and currently trying to implement a filter to search through the list of courses; but this is where my problem lies. 

I have been following this link here to help me implement a filter and changed it to suit the needs of my application.

However, when I implement this I get two problems: 

The first issue is when I bind my ObservableCollection to the ItemSource within my view (for the course list), nothing seems to display. 

The second issue is that get the following error;

Object reference not set to an instance of an object.

This is produced when I call View.Refresh();

I have put together a sample application to represent my problem that I encounter, which can be found here - ListviewSearch

Could anyone please help me in trying to solve this issue?

Many thanks in advance.



Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>