c# - Is it possible multiple filters in one collection view source wpf -


I know a filter in a collection view source, but when I use multiple filters in a collection source. The last filter works properly, please help filter me a lot in a collection view source.

Xaml

  & lt; Grid & gt; & Lt; DockPanel & gt; & Lt; Dockpanel dockpanel.doc = "top" height = "90" & gt; & Lt; Text Block Vertical Element = "Center" Margin = "0,9" Dock Panel Doc = "left" & gt; Threshold & lt; / Textblocks & gt; & Lt; Slider x: Name = "Confidencethreshold" value = "14" margin = "0,5" DockPanel.Dock = "Left" Width = "200" min = "0" max = "50" value changed = "Confidencethreshold_ValueChanged_1" TickPlacement = "Lower right" tick fractancy = "5" ISANAPTTEKINED = "FOLLS" small change = "1" & gt; & Lt; / Slider & gt; & Lt; StackPanel Orientation = "Horizontal" & gt; & Lt; Radio button x: name = "radiofound" ischacade = "true" content = "match" is checked = "radiofoundcaheck_1_1" margin = "6" /> & Lt; Radio button x: name = "radiool" content = "all" checked = "radio forex hacked_1" margin = "6" /> & Lt; / StackPanel & gt; & Lt; / DockPanel & gt; & Lt; Datagrid name = "DG2" itemsource = "{binding}" autoconstrument columns = "falls" canusource column = "true" & gt; & Lt; DataGrid.Columns & gt; & Lt ;! - & lt; Mui: DataGridCheckBoxColumn header = "Mute reduction" binding = "{binding P1}" /> and - gt; & Lt; Mui: DataGridTextColumn Header = "Segment" Binding = "{Binning Snom}" IsReadOnly = "True" /> & Lt ;! - & lt; Mui: data grid checkbox column header = "trimming" binding = "{binding trim}" /> & Lt; Mui: DataGridCheckBoxColumn header = "format conversion" binding = "{bidding alloy}" /> & Lt; Mui: DataGridCheckBoxColumn header = "validation" binding = "{binding rig}" /> - & gt; ! & Lt; - & lt; My: DataGridComboBoxColumn header = "status" SelectedItemBinding = "{binding status}" ItemsSource = "{binding source = {StaticResource myEnum}}" /> - & gt; & Lt; Mui: DataGridTextColumn header = "key" binding = "{binding key}" IsReadOnly = "True" /> ! & Lt; - & lt; My: DataGridTextColumn header = "trust" binding = "{binding conf}" IsReadOnly = "true" SortDirection = "ascending" SortMemberPath = "{binding conf}" /> - & gt; & Lt; Mui: DataGridTextColumn Header = "Trust" Binding = "{Binding Confess}" IsReadOnly = "True" /> & Lt; /DataGrid.Columns> & Lt; / Data grid & gt; & Lt; / DockPanel & gt; & Lt; / Grid & gt; And c # in the main window w1 = (main window) window.getwindow (this); CVS = new archive (); Cvs.Source = w1.allresults; Cvs.Filter + = cvs_Filter; DG2 Datacontax = cvs; Zero cvs_Filter (Object Sender, FilterEventArgs e) {KeysFound t = e.Item KeysFound; If (t! = Null) // If the filter is turned on, then filter the whole item. {If (t.conf and lt; Confidencethreshold.Value) e. Approved = Incorrect; Text after the other (E. Approved = true;}}}    

You can use ICollectionView instead of datagrid source You can use CollectionViewSource. The link below can be helpful.



Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -