バージョン

FilterCondition クラス

行フィルターの条件定義に使用されるクラスです。
シンタックス
'宣言
 
Public Class FilterCondition 
   Inherits Infragistics.Shared.SubObjectBase
public class FilterCondition : Infragistics.Shared.SubObjectBase 
解説

FilterCondition オブジェクトは 1 つの条件を定義します。FilterConditionsCollection には複数の FilterCondition インスタンスを追加できます。ColumnFilter インスタンスには FilterConditionsCollection インスタンスが含まれます。ColumnFilter は、ColumnFilter の FilterConditionCollection に含まれる複数の条件の結合方法を指定する LogicalOperator プロパティを持ちます。ColumnFiltersCollection には複数の ColumnFilter インスタンスを格納できます。UltraGridBand オブジェクトと RowsCollection オブジェクトの両方で ColumnFilters プロパティが公開されています。このプロパティは ColumnFilter オブジェクトのコレクションを返します。UltraGrid は行をフィルタリングする際、Override の UltraGridOverride.RowFilterMode プロパティの設定値に基づいて RowsCollection の RowsCollection.ColumnFilters または UltraGridBand の UltraGridBand.ColumnFilters のどちらかを使用します。詳細は UltraGridOverride.RowFilterMode を参照してください。

使用例
Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid

  Private Sub Button10_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button10.Click

      Dim band As UltraGridBand = Me.UltraGrid1.DisplayLayout.Bands(2)

      ' Set AllowRowFiltering to true to allow the user to filter rows. This is not
      ' necessary for filtering rows through code.
      band.Override.AllowRowFiltering = DefaultableBoolean.True

      ' You can enable or disable row filtering on individual columns too.
      ' Column's setting have higher precedence for that column than the band's
      ' override settings.
      band.Columns("Phone").AllowRowFiltering = DefaultableBoolean.False

      ' Set the RowFilterMode off the override to AllRowsInBand so that the
      ' ultragrid makes use of UltraGridBand.ColumnFilters.
      band.Override.RowFilterMode = RowFilterMode.AllRowsInBand

      ' Clear any previous filters on that column.
      band.ColumnFilters("Unit Price").FilterConditions.Clear()

      ' Add two conditions one that requires value be greater than 5 and another
      ' that requires that the value be less than 10. Also we want to And these
      ' conditions because the value must satisfy both conditions. To do that
      ' set the LogicalOperator on the ColumnFilter of that column to And.
      band.ColumnFilters("Unit Price").FilterConditions.Add(FilterComparisionOperator.GreaterThan, 5)
      band.ColumnFilters("Unit Price").FilterConditions.Add(FilterComparisionOperator.LessThan, 10)
      band.ColumnFilters("Unit Price").LogicalOperator = FilterLogicalOperator.And

  End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;

private void button10_Click(object sender, System.EventArgs e)
{

	UltraGridBand band = this.ultraGrid1.DisplayLayout.Bands[2];

	// Set AllowRowFiltering to true to allow the user to filter rows. This is not
	// necessary for filtering rows through code.
	band.Override.AllowRowFiltering = DefaultableBoolean.True;

	// You can enable or disable row filtering on individual columns too.
	// Column's setting have higher precedence for that column than the band's
	// override settings.
	band.Columns["Phone"].AllowRowFiltering = DefaultableBoolean.False;

	// Set the RowFilterMode off the override to AllRowsInBand so that the
	// ultragrid makes use of UltraGridBand.ColumnFilters.
	band.Override.RowFilterMode = RowFilterMode.AllRowsInBand;

	// Clear any previous filters on that column.
	band.ColumnFilters["Unit Price"].FilterConditions.Clear( );

	// Add two conditions one that requires value be greater than 5 and another
	// that requires that the value be less than 10. Also we want to And these
	// conditions because the value must satisfy both conditions. To do that
	// set the LogicalOperator on the ColumnFilter of that column to And.
	band.ColumnFilters["Unit Price"].FilterConditions.Add( FilterComparisionOperator.GreaterThan, 5 );
	band.ColumnFilters["Unit Price"].FilterConditions.Add( FilterComparisionOperator.LessThan, 10 );
	band.ColumnFilters["Unit Price"].LogicalOperator = FilterLogicalOperator.And;

}
参照