Version

RecordFiltersLogicalOperator Property

Specifies whether filter conditions across fields are to be combined using logical 'Or' or 'And'. Default is resolved to 'And'.
Syntax
'Declaration
 
Public Property RecordFiltersLogicalOperator As Nullable(Of LogicalOperator)
public Nullable<LogicalOperator> RecordFiltersLogicalOperator {get; set;}
Remarks

RecordFiltersLogicalOperator property specifies how record filters across fields are to be combined. ‘Or’ means only filters of one field are required to pass in order to filter the record. ‘And’ means filters of all fields are required to pass in order to filter the record. The default 'And' which means that filters of all fields are required to pass in order to filter the record.

Example
The following code sets RecordFiltersLogicalOperator to Or to have filter criteria accross fields or'ed instead of and'ed. It filters records so the records with Price of less than or equal to 0 OR Quantity of less than or equal to 0 are displayed.

Imports Infragistics.Windows
Imports Infragistics.Windows.Controls
Imports Infragistics.Windows.Editors
Imports Infragistics.Windows.DataPresenter
Imports Infragistics.Windows.DataPresenter.Events

    Private Sub Window1_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
        
        Dim fieldLayout As FieldLayout = _dp.FieldLayouts(0)

        ' Create Price <= 0 filter.
        Dim priceFilter As RecordFilter = New RecordFilter()
        priceFilter.FieldName = "Price"
        priceFilter.Conditions.Add(New ComparisonCondition(ComparisonOperator.LessThanOrEqualTo, 0))

        ' Create Quantity <= 0 filter.
        Dim quantityFilter As RecordFilter = New RecordFilter()
        quantityFilter.FieldName = "Quantity"
        quantityFilter.Conditions.Add(New ComparisonCondition(ComparisonOperator.LessThanOrEqualTo, 0))

        ' Add both filters.
        fieldLayout.RecordFilters.Add(priceFilter)
        fieldLayout.RecordFilters.Add(quantityFilter)

        ' By default the filters are AND'ed across fields. That is a record must match 
        ' the filter criteria of all fields for it to be considered fitlered in. However
        ' in certain cases you may want to OR the filter criteria across fields. Here
        ' we want to display records where the Price <= 0 OR the Quantity <= 0. 
        ' Therefore set the RecordFiltersLogicalOperator to 'Or'.
        fieldLayout.Settings.RecordFiltersLogicalOperator = LogicalOperator.Or

    End Sub
using Infragistics.Windows;
using Infragistics.Windows.Controls;
using Infragistics.Windows.Editors;
using Infragistics.Windows.DataPresenter;
using Infragistics.Windows.DataPresenter.Events;

public void Window1_Loaded( object sender, RoutedEventArgs e )
		{
			FieldLayout fieldLayout = _dp.FieldLayouts[0];

			// Create Price <= 0 filter.
			RecordFilter priceFilter = new RecordFilter( );
			priceFilter.FieldName = "Price";
			priceFilter.Conditions.Add( new ComparisonCondition( ComparisonOperator.LessThanOrEqualTo, 0 ) );

			// Create Quantity <= 0 filter.
			RecordFilter quantityFilter = new RecordFilter( );
			quantityFilter.FieldName = "Quantity";
			quantityFilter.Conditions.Add( new ComparisonCondition( ComparisonOperator.LessThanOrEqualTo, 0 ) );

			// Add both filters.
			fieldLayout.RecordFilters.Add( priceFilter );
			fieldLayout.RecordFilters.Add( quantityFilter );

			// By default the filters are AND'ed across fields. That is a record must match 
			// the filter criteria of all fields for it to be considered fitlered in. However
			// in certain cases you may want to OR the filter criteria across fields. Here
			// we want to display records where the Price <= 0 OR the Quantity <= 0. 
			// Therefore set the RecordFiltersLogicalOperator to 'Or'.
			fieldLayout.Settings.RecordFiltersLogicalOperator = LogicalOperator.Or;
		}
        <igDP:XamDataGrid x:Name="_dp" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >

            
<igDP:XamDataGrid.FieldLayouts>
                
                
<igDP:FieldLayout>
                    
<igDP:FieldLayout.Fields>
                        
<igDP:Field Name="ID" />
                        
<igDP:Field Name="Price" />
                        
<igDP:Field Name="Quantity" />                        
                    
</igDP:FieldLayout.Fields>

                    
<igDP:FieldLayout.Settings>
                        
<igDP:FieldLayoutSettings
                            
RecordFiltersLogicalOperator="Or"
                        
/>
                    
</igDP:FieldLayout.Settings>
                    
                    
<igDP:FieldLayout.RecordFilters>
                        
<igDP:RecordFilter FieldName="Price">
                            
<igWindows:ComparisonCondition Operator="LessThanOrEqualTo" Value="0" />
                        
</igDP:RecordFilter>
                        
<igDP:RecordFilter FieldName="Quantity">
                            
<igWindows:ComparisonCondition Operator="LessThanOrEqualTo" Value="0" />
                        
</igDP:RecordFilter>
                    
</igDP:FieldLayout.RecordFilters>
                    
                
</igDP:FieldLayout>
                
            
</igDP:XamDataGrid.FieldLayouts>
            
        
</igDP:XamDataGrid>
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also