Version

UltraGridFilterRow Class

A class to represent a filter row.
Syntax
'Declaration
 
Public Class UltraGridFilterRow 
   Inherits UltraGridSpecialRowBase
   Implements Infragistics.Shared.ISelectableItem, Infragistics.Shared.ISparseArrayItem, Infragistics.Shared.ISparseArrayMultiItem, Infragistics.Win.IUIElementProvider, Infragistics.Win.IUIElementTextProvider 
public class UltraGridFilterRow : UltraGridSpecialRowBase, Infragistics.Shared.ISelectableItem, Infragistics.Shared.ISparseArrayItem, Infragistics.Shared.ISparseArrayMultiItem, Infragistics.Win.IUIElementProvider, Infragistics.Win.IUIElementTextProvider  
Example
The following code shows you how to get the filter row associated with a rows collection. It also demonstrates the UltraGridRow's IsFilterRow and UltraGridCell's IsFilterRowCell properties.

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 );
		}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also