Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1564
Filtering
posted

In WPF there is a simple way to filter the data of a list/listview/grid.... take a look at this article : http://www.beacosta.com/blog/?p=31

 To summarize, we have to use a CollectionViewSource and link it to our collection.

 After, we use cvs.Filter += new FilterEventHandler(OnFilter);

 void OnFilter(object sender, FilterEventArgs e)
  {
            if (...) e.Accepted = false;
  }

Like this we can even use several combination of filters. 

 ... but with xamDataGrid... we cannot use the CollectionViewSourc, so how can we do ?