'Declaration Public Property RecordFiltersLogicalOperator As Nullable(Of LogicalOperator)
public Nullable<LogicalOperator> RecordFiltersLogicalOperator {get; set;}
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.
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; }
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