'宣言 Public Property RecordFiltersLogicalOperator As Nullable(Of LogicalOperator)
public Nullable<LogicalOperator> RecordFiltersLogicalOperator {get; set;}
RecordFiltersLogicalOperator プロパティは、複数フィールドに渡るレコード フィルターを組み合わせる方法を指定します。Or: 少なくても 1 つのフィールドのフィルターは条件を渡す場合は、レコードをフィルターします。And: すべてのフィールドのフィルターは条件を渡す場合は、レコードをフィルターします。レコードをフィルターするために、すべてのフィールドのフィルターが渡される必要があるデフォルトの And。
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; }