Version

RecordFilterAction Enumeration

Used for specifying FieldLayoutSettings.FilterAction property.
Syntax
'Declaration
 
Public Enum RecordFilterAction 
   Inherits System.Enum
public enum RecordFilterAction : System.Enum 
Members
MemberDescription
DefaultDefault is resolved to Hide.
DisableDisables filtered out records. The RecordPresenter's RecordPresenter.IsOpacityReduced property will be updated. The default templates trigger off this property to set the RecordContentSite Opacity.
DoNothingRecord’s DataRecord.IsFilteredOut property will be updated however no other action will be taken. The fitlered out records will remain visible and will not have their opacity reduced. This is useful if you want to style records differently when they are filtered out (for example, apply different background color to filtered or non-filtered records).
HideHides filtered out records.
NoneObsolete, use 'ReduceOpacity' or 'DoNothing' instead. Note: 'None' is equivalent to 'ReduceOpacity'.
ReduceOpacityRecord’s DataRecord.IsFilteredOut, property will be updated as well as the RecordPresenter's RecordPresenter.IsOpacityReduced. The default templates trigger off this property to set the RecordContentSite Opacity.
Example
The following code demonstrates the usage of FilterAction property setting, particularly the 'None' setting of this property. It highlights records matching filter conditions as green and records not matching filter conditions as yellow.

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)
        
        ' By default the data presenter hides records not matching filter criteria.
        ' Set the FilterAction to None to keep those records in view.
        _dp.FieldLayoutSettings.FilterAction = RecordFilterAction.None

        Dim filter As RecordFilter = New RecordFilter()
        filter.FieldName = "Country"
        filter.Conditions.Add(New ComparisonCondition(ComparisonOperator.Equals, "US"))
        _dp.FieldLayouts(0).RecordFilters.Add(filter)

        ' Create a style that targets DataRecordCellArea.
        Dim style As Style = New Style(GetType(DataRecordCellArea))

        ' Add a trigger that will highlight records green that match the filter criteria.
        Dim matchCriteriaTrigger As Trigger = New Trigger()
        matchCriteriaTrigger.Property = DataRecordCellArea.IsFilteredOutProperty
        matchCriteriaTrigger.Value = False
        matchCriteriaTrigger.Setters.Add(New Setter(Control.BackgroundProperty, Brushes.LightGreen))

        ' Add a trigger that will highlight records yellow that match the filter criteria.
        Dim notMatchCriteriaTrigger As Trigger = New Trigger()
        notMatchCriteriaTrigger.Property = DataRecordCellArea.IsFilteredOutProperty
        notMatchCriteriaTrigger.Value = True
        notMatchCriteriaTrigger.Setters.Add(New Setter(Control.BackgroundProperty, Brushes.LightYellow))

        style.Triggers.Add(matchCriteriaTrigger)
        style.Triggers.Add(notMatchCriteriaTrigger)

        ' Add the style.
        _dp.Resources.Add(GetType(DataRecordCellArea), style)

    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 )
		{
			// By default the data presenter hides records not matching filter criteria.
			// Set the FilterAction to None to keep those records in view.
			_dp.FieldLayoutSettings.FilterAction = RecordFilterAction.None;

			RecordFilter filter = new RecordFilter( );
			filter.FieldName = "Country";
			filter.Conditions.Add( new ComparisonCondition( ComparisonOperator.Equals, "US" ) );
			_dp.FieldLayouts[0].RecordFilters.Add( filter );

			// Create a style that targets DataRecordCellArea.
			Style style = new Style( typeof( DataRecordCellArea ) );
			
			// Add a trigger that will highlight records green that match the filter criteria.
			Trigger matchCriteriaTrigger = new Trigger( );
			matchCriteriaTrigger.Property = DataRecordCellArea.IsFilteredOutProperty;
			matchCriteriaTrigger.Value = false;
			matchCriteriaTrigger.Setters.Add( new Setter( Control.BackgroundProperty, Brushes.LightGreen ) );

			// Add a trigger that will highlight records yellow that match the filter criteria.
			Trigger notMatchCriteriaTrigger = new Trigger( );
			notMatchCriteriaTrigger.Property = DataRecordCellArea.IsFilteredOutProperty;
			notMatchCriteriaTrigger.Value = true;
			notMatchCriteriaTrigger.Setters.Add( new Setter( Control.BackgroundProperty, Brushes.LightYellow ) );
	
			style.Triggers.Add( matchCriteriaTrigger );
			style.Triggers.Add( notMatchCriteriaTrigger );

			// Add the style.
			_dp.Resources.Add( typeof( DataRecordCellArea ), style );
		}
        <igDP:XamDataGrid x:Name="_dp" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >

            
<igDP:XamDataGrid.FieldLayoutSettings>
                
<!--By default the data presenter hides records not matching filter criteria.
         Set the FilterAction to None to keep those records in view.
-->
                
<igDP:FieldLayoutSettings FilterAction="None" />
            
</igDP:XamDataGrid.FieldLayoutSettings>
            
            
<igDP:XamDataGrid.Resources>
                
<!--Create a style that targets DataRecordCellArea.-->
                
<Style x:Key="{x:Type igDP:DataRecordCellArea}" TargetType="{x:Type igDP:DataRecordCellArea}">
                    
<Style.Triggers>
                        
<!--Add a trigger that will highlight records green that match the filter criteria.-->
                        
<Trigger Property="IsFilteredOut" Value="false">
                            
<Setter Property="Background" Value="LightGreen" />
                        
</Trigger>
                        
<!--Add a trigger that will highlight records yellow that match the filter criteria.-->
                        
<Trigger Property="IsFilteredOut" Value="true">
                            
<Setter Property="Background" Value="LightYellow" />
                        
</Trigger>
                    
</Style.Triggers>
                
</Style>
            
</igDP:XamDataGrid.Resources>

            
<igDP:XamDataGrid.FieldLayouts>
                
                
<igDP:FieldLayout IsDefault="true">

                    
<igDP:FieldLayout.RecordFilters>
                        
<!--Add a filter for 'Country' field-->
                        
<igDP:RecordFilter FieldName="Country">
                            
<igWindows:ComparisonCondition Operator="Equals" Value="US" />
                        
</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