'Declaration Public Enum ComparisonOperator Inherits System.Enum
public enum ComparisonOperator : System.Enum
Member | Description |
---|---|
Bottom | Tests to see if the value is in the bottom 'X' values where 'X' is specified in the operand. |
BottomPercentile | Tests to see if the value is in the bottom 'X' percentile of values where 'X' is specified in the operand. |
Contains | Tests to see if the value contains the comparison value. |
DoesNotContain | Complement of Contains. |
DoesNotEndWith | Complement of EndsWith. |
DoesNotMatch | Complement of Match. |
DoesNotStartWith | Complement of StartsWith. |
EndsWith | Tests to see if the value ends with the comparison value. |
Equals | Tests for two values being equal. |
GreaterThan | Tests for the value being greater than the comparison value. |
GreaterThanOrEqualTo | Tests for the value being greater than or equal to the comparison value. |
In | Tests to see if the value is one of specified values. |
LessThan | Tests for the value being less than the comparison value. |
LessThanOrEqualTo | Tests for the value being less than or equal to the comparison value. |
Like | Will do a wild-card comparison of the value to the comparison value where the comparison value is the wild card string. |
Match | Will do a regular expression comparison of the value to the comparison value where the comparison value is the regular expression string. |
NotEquals | Tests for two values being not equal. |
NotIn | Tests to see if the value is not one of specified values. |
NotLike | Complement of Like. |
StartsWith | Tests to see if the value starts with the comparison value. |
Top | Tests to see if the value is in the top 'X' values where 'X' is specified in the operand. |
TopPercentile | Tests to see if the value is in the top 'X' percentile of values where 'X' is specified in the operand. |
Imports Infragistics.Windows Imports Infragistics.Windows.Controls Imports Infragistics.Windows.Editors Imports Infragistics.Windows.DataPresenter Private Sub Window1_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs) Dim fieldLayout As FieldLayout = _dp.FieldLayouts(0) ' Create a new RecordFilter for 'Country' field. Dim filter As RecordFilter = New RecordFilter() filter.FieldName = "Country" filter.Conditions.Add(New ComparisonCondition(ComparisonOperator.Equals, "US")) ' Add the RecordFilter to field layout's RecordFilters collection. fieldLayout.RecordFilters.Add(filter) ' If you have hierarchical data source then you can also filter child records. ' Create a RecordFilter that filters the child records. filter = New RecordFilter() filter.FieldName = "Product" filter.Conditions.Add(New ComparisonCondition(ComparisonOperator.Equals, "A")) ' Now add the filter. For child field layouts, each individual parent ' record's child records can be filtered independently. That is one parent ' record's child records can have different filter criteria from another ' parent record's child records. This is the default mode of filtering. You ' can change it by setting RecordFilterScope property to AllRecords in which ' case all child records in the child field layout are affected by the ' filter. However depending on the mode, the place where you specify the ' filter criteria is different. For the default SiblingDataRecords mode, you ' need to specify the filter criteria on RecordFilters property of the child ' RecordManager of a parent record. For the AllRecords mode, use the child ' FieldLayout's RecordFilters property. Note that the root field layout ' doesn't support SiblingDataRecords mode since it doesn't have multiple ' record collections and therefore for the root field layout, always use the ' field layout's RecordFilters property. ' Dim childDataRecordsManager As RecordManager = _dp.RecordManager.Unsorted(0).ChildRecords(0).ChildRecordManager Dim childFieldLayout As FieldLayout = _dp.FieldLayouts(1) childFieldLayout.Settings.RecordFilterScope = RecordFilterScope.AllRecords If RecordFilterScope.AllRecords = childFieldLayout.Settings.RecordFilterScope Then ' When using AllRecords mode, use the field layout's RecordFilters. childFieldLayout.RecordFilters.Add(filter) Else ' When using SiblingDataRecords, use the child RecordManager's RecordFilters. childDataRecordsManager.RecordFilters.Add(filter) End If End Sub
using Infragistics.Windows; using Infragistics.Windows.Controls; using Infragistics.Windows.Editors; using Infragistics.Windows.DataPresenter; public void Window1_Loaded( object sender, RoutedEventArgs e ) { FieldLayout fieldLayout = _dp.FieldLayouts[0]; // Create a new RecordFilter for 'Country' field. RecordFilter filter = new RecordFilter( ); filter.FieldName = "Country"; filter.Conditions.Add( new ComparisonCondition( ComparisonOperator.Equals, "US" ) ); // Add the RecordFilter to field layout's RecordFilters collection. fieldLayout.RecordFilters.Add( filter ); // If you have hierarchical data source then you can also filter child records. // Create a RecordFilter that filters the child records. filter = new RecordFilter( ); filter.FieldName = "Product"; filter.Conditions.Add( new ComparisonCondition( ComparisonOperator.Equals, "A" ) ); // Now add the filter. For child field layouts, each individual parent // record's child records can be filtered independently. That is one parent // record's child records can have different filter criteria from another // parent record's child records. This is the default mode of filtering. You // can change it by setting RecordFilterScope property to AllRecords in which // case all child records in the child field layout are affected by the // filter. However depending on the mode, the place where you specify the // filter criteria is different. For the default SiblingDataRecords mode, you // need to specify the filter criteria on RecordFilters property of the child // RecordManager of a parent record. For the AllRecords mode, use the child // FieldLayout's RecordFilters property. Note that the root field layout // doesn't support SiblingDataRecords mode since it doesn't have multiple // record collections and therefore for the root field layout, always use the // field layout's RecordFilters property. // RecordManager childDataRecordsManager = _dp.RecordManager.Unsorted[0].ChildRecords[0].ChildRecordManager; FieldLayout childFieldLayout = _dp.FieldLayouts[1]; childFieldLayout.Settings.RecordFilterScope = RecordFilterScope.AllRecords; if ( RecordFilterScope.AllRecords == childFieldLayout.Settings.RecordFilterScope ) { // When using AllRecords mode, use the field layout's RecordFilters. childFieldLayout.RecordFilters.Add( filter ); } else { // When using SiblingDataRecords, use the child RecordManager's RecordFilters. childDataRecordsManager.RecordFilters.Add( filter ); } }
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