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

WPF datagrid filter doesn't work dosen't work

$
0
0

Greetings,

I'm trying to have a WPF data grid results filtered and I can't get it to work.  The filter event never fires and all the rows remain.

   <DockPanel.Resources>
                                  
                                           
     <CollectionViewSource x:Key="DetailsCollection"
                           Filter="PriceDetailsFilter"
                           Source="{Binding Path=PriceChangeDetails,
                           UpdateSourceTrigger=PropertyChanged}" >
     </CollectionViewSource>
                                          
    </DockPanel.Resources>
                                     
                                           
  <wpf:DataGrid  CanUserSortColumns="True" CanUserAddRows="False" IsReadOnly="False"
      Block.TextAlignment="Left"
      ItemsSource="{Binding Source={StaticResource DetailsCollection},
   UpdateSourceTrigger=PropertyChanged}"> 

    public void PriceDetailsFilter(object sender, FilterEventArgs e)        {            e.Accepted = false; // breakpoint never hits                    }

  Does anyone see what I'm doing wrong?

Thanks,

                                                                                                      

Viewing all articles
Browse latest Browse all 18858

Trending Articles



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