Infragistics(R) NetAdvantage(R) Windows Forms
FilterOperatorDefaultValue Enumeration
Example  See Also  E-mail your feedback on this topic.
Infragistics.Win.UltraWinGrid Namespace : FilterOperatorDefaultValue Enumeration

Enum for specifying Override's UltraGridOverride.FilterOperatorDefaultValue and Column's UltraGridColumn.FilterOperatorDefaultValue properties.

Syntax

Visual Basic (Declaration) 
Public Enum FilterOperatorDefaultValue 
   Inherits System.Enum
C# 
public enum FilterOperatorDefaultValue : System.Enum 

Members

MemberDescription
ContainsCorresponds to Contains member of FilterComparisionOperator.
DefaultDefault is resolved to StartsWith.
DoesNotContainCorresponds to DoesNotContain member of FilterComparisionOperator.
DoesNotEndWithCorresponds to DoesNotEndWith member of FilterComparisionOperator.
DoesNotMatchCorresponds to DoesNotMatch member of FilterComparisionOperator.
DoesNotStartWithCorresponds to DoesNotStartWith member of FilterComparisionOperator.
EndsWithCorresponds to EndsWith memebr of FilterComparisionOperator.
EqualsCorresponds to Equals member of FilterComparisionOperator.
GreaterThanCorresponds to GreaterThan member of FilterComparisionOperator.
GreaterThanOrEqualToCorresponds to GreaterThanOrEqualTo member of FilterComparisionOperator.
LessThanCorresponds to LessThan member of FilterComparisionOperator.
LessThanOrEqualToCorresponds to LessThanOrEqualTo member of FilterComparisionOperator.
LikeCorresponds to Like member of FilterComparisionOperator.
MatchCorresponds to Match member of FilterComparisionOperator.
NotEqualsCorresponds to NotEquals member of FilterComparisionOperator.
NotLikeCorresponds to NotLike member of FilterComparisionOperator.
StartsWithCorresponds to StartsWith member of FilterComparisionOperator.

Example

Following code shows some of the properties available to control the behavior related aspects of the Filter Row functionality.

Visual BasicCopy Code
Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid

    Private Sub UltraGrid1_InitializeLayout(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles UltraGrid1.InitializeLayout
        ' Enable the the filter row user interface by setting the FilterUIType to FilterRow.
        e.Layout.Override.FilterUIType = FilterUIType.FilterRow

        ' FilterEvaluationTrigger specifies when UltraGrid applies the filter criteria typed 
        ' into a filter row. Default is OnCellValueChange which will cause the UltraGrid to
        ' re-filter the data as soon as the user modifies the value of a filter cell. This
        ' property is exposed off the the column as well so it can be set on a per column basis.
        e.Layout.Override.FilterEvaluationTrigger = FilterEvaluationTrigger.OnCellValueChange
        e.Layout.Bands(0).Columns(0).FilterEvaluationTrigger = FilterEvaluationTrigger.OnEnterKeyOrLeaveCell

        ' By default the UltraGrid selects the type of the filter operand editor based on
        ' the column's DataType. For DateTime and boolean columns it uses the column's editors.
        ' For other column types it uses the Combo. You can explicitly specify the operand
        ' editor style by setting the FilterOperandStyle on the override or the individual
        ' columns. This property is exposed on the column as well.
        e.Layout.Override.FilterOperandStyle = FilterOperandStyle.Combo
        e.Layout.Bands(0).Columns(0).FilterOperandStyle = FilterOperandStyle.DropDownList

        ' By default UltraGrid displays user interface for selecting the filter operator. 
        ' You can set the FilterOperatorLocation to hide this user interface. This
        ' property is available on column as well so it can be controlled on a per column
        ' basis. Default is WithOperand. This property is exposed off the column as well.
        e.Layout.Override.FilterOperatorLocation = FilterOperatorLocation.WithOperand
        e.Layout.Bands(0).Columns(0).FilterOperatorLocation = FilterOperatorLocation.Hidden

        ' By default the UltraGrid uses StartsWith as the filter operator. You use
        ' the FilterOperatorDefaultValue property to specify a different filter operator
        ' to use. This is the default or the initial filter operator value of the cells
        ' in filter row. If filter operator user interface is enabled (FilterOperatorLocation
        ' is not set to Hidden) then that ui will be initialized to the value of this
        ' property. The user can then change the operator via the operator ui. This
        ' property is exposed off the column as well.
        e.Layout.Override.FilterOperatorDefaultValue = FilterOperatorDefaultValue.StartsWith
        e.Layout.Bands(0).Columns(0).FilterOperatorDefaultValue = FilterOperatorDefaultValue.Equals

        ' FilterOperatorDropDownItems property can be used to control the options provided
        ' to the user for selecting the filter operator. By default UltraGrid bases 
        ' what operator options to provide on the column's data type. This property is
        ' avaibale on the column as well. Note that FilterOperatorDropDownItems is a flagged
        ' enum and thus multiple options can be combined using bitwise or operation.
        e.Layout.Override.FilterOperatorDropDownItems = FilterOperatorDropDownItems.All
        e.Layout.Bands(0).Columns(0).FilterOperatorDropDownItems = FilterOperatorDropDownItems.Equals Or FilterOperatorDropDownItems.NotEquals

        ' By default UltraGrid displays a clear button in each cell of the filter row
        ' as well as in the row selector of the filter row. When the user clicks this
        ' button the associated filter criteria is cleared. You can use the 
        ' FilterClearButtonLocation property to control if and where the filter clear
        ' buttons are displayed.
        e.Layout.Override.FilterClearButtonLocation = FilterClearButtonLocation.RowAndCell

        ' By default the UltraGrid performs case in-sensitive comparisons for filtering. You can 
        ' use the FilterComparisonType property to change this behavior and perform case sensitive
        ' comparisons. This property is exposed off the column as well so it can be set on a
        ' per column basis.
        e.Layout.Override.FilterComparisonType = FilterComparisonType.CaseSensitive
        e.Layout.Bands(0).Columns(0).FilterComparisonType = FilterComparisonType.CaseInsensitive

    End Sub
C#Copy Code
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;

		private void UltraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
		{
			// Enable the the filter row user interface by setting the FilterUIType to FilterRow.
			e.Layout.Override.FilterUIType = FilterUIType.FilterRow;

			// FilterEvaluationTrigger specifies when UltraGrid applies the filter criteria typed 
			// into a filter row. Default is OnCellValueChange which will cause the UltraGrid to
			// re-filter the data as soon as the user modifies the value of a filter cell. This
			// property is exposed off the the column as well so it can be set on a per column basis.
			e.Layout.Override.FilterEvaluationTrigger = FilterEvaluationTrigger.OnCellValueChange;
			e.Layout.Bands[0].Columns[0].FilterEvaluationTrigger = FilterEvaluationTrigger.OnEnterKeyOrLeaveCell;

			// By default the UltraGrid selects the type of the filter operand editor based on
			// the column's DataType. For DateTime and boolean columns it uses the column's editors.
			// For other column types it uses the Combo. You can explicitly specify the operand
			// editor style by setting the FilterOperandStyle on the override or the individual
			// columns. This property is exposed on the column as well.
			e.Layout.Override.FilterOperandStyle = FilterOperandStyle.Combo;
			e.Layout.Bands[0].Columns[0].FilterOperandStyle = FilterOperandStyle.DropDownList;

			// By default UltraGrid displays user interface for selecting the filter operator. 
			// You can set the FilterOperatorLocation to hide this user interface. This
			// property is available on column as well so it can be controlled on a per column
			// basis. Default is WithOperand. This property is exposed off the column as well.
			e.Layout.Override.FilterOperatorLocation = FilterOperatorLocation.WithOperand;
			e.Layout.Bands[0].Columns[0].FilterOperatorLocation = FilterOperatorLocation.Hidden;

			// By default the UltraGrid uses StartsWith as the filter operator. You use
			// the FilterOperatorDefaultValue property to specify a different filter operator
			// to use. This is the default or the initial filter operator value of the cells
			// in filter row. If filter operator user interface is enabled (FilterOperatorLocation
			// is not set to Hidden) then that ui will be initialized to the value of this
			// property. The user can then change the operator via the operator ui. This
			// property is exposed off the column as well.
			e.Layout.Override.FilterOperatorDefaultValue = FilterOperatorDefaultValue.StartsWith;
			e.Layout.Bands[0].Columns[0].FilterOperatorDefaultValue = FilterOperatorDefaultValue.Equals;

			// FilterOperatorDropDownItems property can be used to control the options provided
			// to the user for selecting the filter operator. By default UltraGrid bases 
			// what operator options to provide on the column's data type. This property is
			// avaibale on the column as well. Note that FilterOperatorDropDownItems is a flagged
			// enum and thus multiple options can be combined using bitwise or operation.
			e.Layout.Override.FilterOperatorDropDownItems = FilterOperatorDropDownItems.All;
			e.Layout.Bands[0].Columns[0].FilterOperatorDropDownItems = FilterOperatorDropDownItems.Equals | FilterOperatorDropDownItems.NotEquals;

			// By default UltraGrid displays a clear button in each cell of the filter row
			// as well as in the row selector of the filter row. When the user clicks this
			// button the associated filter criteria is cleared. You can use the 
			// FilterClearButtonLocation property to control if and where the filter clear
			// buttons are displayed.
			e.Layout.Override.FilterClearButtonLocation = FilterClearButtonLocation.RowAndCell;

			// By default the UltraGrid performs case in-sensitive comparisons for filtering. You can 
			// use the FilterComparisonType property to change this behavior and perform case sensitive
			// comparisons. This property is exposed off the column as well so it can be set on a
			// per column basis.
			e.Layout.Override.FilterComparisonType = FilterComparisonType.CaseSensitive;
			e.Layout.Bands[0].Columns[0].FilterComparisonType = FilterComparisonType.CaseInsensitive;
		}

Remarks

See Also