バージョン

FilterOperatorDefaultValue プロパティ (UltraGridOverride)

フィルター行の演算子セルのデフォルト値(初期値)を指定します。演算子セルが非表示の場合、これは対応するフィルターオペランドセルに入力された値に対するフィルター演算子として使用されます。このプロパティは各列でオーバーライドできます。Default は、DateTime 列または Boolean 列の場合は Equals、その他の型の列の場合は StartsWith に解決されます。
シンタックス
'宣言
 
Public Property FilterOperatorDefaultValue As FilterOperatorDefaultValue
public FilterOperatorDefaultValue FilterOperatorDefaultValue {get; set;}
解説

デフォルトでは、フィルター行にはフィルター オペランドのほかにフィルター演算子を選択するためのユーザー インターフェイスも表示されます。このユーザーインターフェイスを非表示または無効にしてユーザーがフィルター演算子を変更できないようにするには、FilterOperatorLocation プロパティを使用します。デフォルトで使用するフィルター演算子を指定するには、FilterOperatorDefaultValue プロパティを使用します。フィルター演算子 UI を有効にした場合、このプロパティの値が初期値になります。

使用例
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
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;
		}
参照