'宣言 Public Class UltraGridFilterCell Inherits UltraGridCell Implements Infragistics.Shared.IKeyedSubObject, Infragistics.Shared.IKeyedSubObjectEx, Infragistics.Shared.ISelectableItem
public class UltraGridFilterCell : UltraGridCell, Infragistics.Shared.IKeyedSubObject, Infragistics.Shared.IKeyedSubObjectEx, Infragistics.Shared.ISelectableItem
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinGrid Private Sub UltraButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles UltraButton1.Click Dim filterRow As UltraGridFilterRow = Me.UltraGrid1.Rows.FilterRow ' UltraGridFilterRow derives from UltraGridRow. Dim row As UltraGridRow = filterRow ' IsFilterRow property of the UltraGridRow returns true if the row ' is a filter row. Dim isFilterRow As Boolean = row.IsFilterRow ' Cells collection of the filter row contains instances of ' UltraGridFilterCell objects. Dim cell As UltraGridCell = row.Cells(0) Dim filerCell As UltraGridFilterCell = DirectCast(cell, UltraGridFilterCell) ' IsFilterRowCell property of the UltraGridCell returns true if the ' cell belongs to a filter row. Dim isFilterRowCell As Boolean = cell.IsFilterRowCell ' The isFilterRow and isFilterRowCell should both be true. System.Diagnostics.Debug.WriteLine("Is filter row = " & isFilterRow & ". Is Filter Row Cell = " & isFilterRowCell) End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinGrid; using System.Diagnostics; private void ultraButton1_Click(object sender, System.EventArgs e) { UltraGridFilterRow filterRow = this.UltraGrid1.Rows.FilterRow; // UltraGridFilterRow derives from UltraGridRow. UltraGridRow row = filterRow; // IsFilterRow property of the UltraGridRow returns true if the row // is a filter row. bool isFilterRow = row.IsFilterRow; // Cells collection of the filter row contains instances of // UltraGridFilterCell objects. UltraGridCell cell = row.Cells[0]; UltraGridFilterCell filerCell = (UltraGridFilterCell)cell; // IsFilterRowCell property of the UltraGridCell returns true if the // cell belongs to a filter row. bool isFilterRowCell = cell.IsFilterRowCell; // The isFilterRow and isFilterRowCell should both be true. System.Diagnostics.Debug.WriteLine( "Is filter row = " + isFilterRow + ". Is Filter Row Cell = " + isFilterRowCell ); }