'宣言 Public Overloads Function MeetsCriteria( _ ByVal filterCondition As FilterCondition _ ) As Boolean
public bool MeetsCriteria( FilterCondition filterCondition )
渡されたフィルター条件によって指定される基準を行が満たす場合、Trueを返します。
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 ' Call RefreshFilters to cause the UltraGrid to reevaluate any filters and fire ' FilterRow event on every row. ' e.Layout.RefreshFilters() End Sub Private Sub UltraGrid1_FilterRow(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.FilterRowEventArgs) Handles UltraGrid1.FilterRow Dim band As UltraGridBand = e.Row.Band If "Customers" = band.Key Then ' Create a filter condition that will only show rows whose CustomerID field begins with the letter 'A'. ' Dim fc As FilterCondition = New FilterCondition(band.Columns("CustomerID"), FilterComparisionOperator.Like, "A*") ' Call MeetsCriteria method off the row to test if the row passes the filter. ' If Not e.Row.MeetsCriteria(fc) Then e.RowFilteredOut = True Else e.RowFilteredOut = False End If End If 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) { // Call RefreshFilters to cause the UltraGrid to reevaluate any filters and fire // FilterRow event on every row. // e.Layout.RefreshFilters( ); } private void ultraGrid1_FilterRow(object sender, Infragistics.Win.UltraWinGrid.FilterRowEventArgs e) { UltraGridBand band = e.Row.Band; if ( "Customers" == band.Key ) { // Create a filter condition that will only show rows whose CustomerID field begins with the letter 'A'. // FilterCondition fc = new FilterCondition( band.Columns[ "CustomerID" ], FilterComparisionOperator.Like, "A*" ); // Call MeetsCriteria method off the row to test if the row passes the filter. // if ( ! e.Row.MeetsCriteria( fc ) ) e.RowFilteredOut = true; else e.RowFilteredOut = false; } }