Infragistics(R) NetAdvantage(R) Windows Forms
UltraGridFilterRow Class
Members  Example  See Also  E-mail your feedback on this topic.
Infragistics.Win.UltraWinGrid Namespace : UltraGridFilterRow Class

A class to represent a filter row.

Syntax

Visual Basic (Declaration) 
Public Class UltraGridFilterRow 
   Inherits UltraGridSpecialRowBase
   Implements Infragistics.Shared.ISelectableItem, Infragistics.Shared.ISparseArrayItem, Infragistics.Shared.ISparseArrayMultiItem, Infragistics.Win.IUIElementProvider, Infragistics.Win.IUIElementTextProvider 
C# 
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.

Visual BasicCopy Code
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
C#Copy Code
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 );
		}

See Also