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

EventArgs for FilterCellValueChanged event.

Syntax

Visual Basic (Declaration) 
Public Class FilterCellValueChangedEventArgs 
   Inherits System.EventArgs
C# 
public class FilterCellValueChangedEventArgs : System.EventArgs 

Example

The following code shows some of the information available in the FilterCellValueChanged event handler.

For an overview of how to handle events in Visual Basic or Visual C#, see Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see Consuming Events in the .NET Framework Developer's Guide.

Visual BasicCopy Code
Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid


    Private Sub UltraGrid1_FilterCellValueChanged(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.FilterCellValueChangedEventArgs) Handles UltraGrid1.FilterCellValueChanged
        ' Get the filter cell whose value changed.
        Dim filterCell As UltraGridFilterCell = e.FilterCell
        Dim editor As EmbeddableEditorBase = filterCell.EditorResolved

        System.Diagnostics.Debug.WriteLine("FilterCellValueChanged: ")
        System.Diagnostics.Debug.WriteLine("	New Text = " & editor.CurrentEditText)

        If editor.IsValid Then
            ' If the user has entered a valid value in the editor then write it out.
            System.Diagnostics.Debug.WriteLine("	New Value = " & editor.Value.ToString())
        Else
            ' A value can be invallid for example if the field is a date time field
            ' and the user has not fully input a date.
            System.Diagnostics.Debug.WriteLine("	New Value is Invalid")
        End If

        ' You can conditionally cause or prevent the UltraGrid from re-filtering the
        ' rows based on the new filter value by setting the ApplyNewFilter to true 
        ' or false respectively.
        e.ApplyNewFilter = False
    End Sub
C#Copy Code
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;


		private void UltraGrid1_FilterCellValueChanged(object sender, Infragistics.Win.UltraWinGrid.FilterCellValueChangedEventArgs e)
		{
			// Get the filter cell whose value changed.
			UltraGridFilterCell filterCell = e.FilterCell;
			EmbeddableEditorBase editor = filterCell.EditorResolved;

			System.Diagnostics.Debug.WriteLine( "FilterCellValueChanged: " );
			System.Diagnostics.Debug.WriteLine( "	New Text = " + editor.CurrentEditText );

			if ( editor.IsValid )
			{
				// If the user has entered a valid value in the editor then write it out.
				System.Diagnostics.Debug.WriteLine( "	New Value = " + editor.Value.ToString( ) );
			}
			else
			{
				// A value can be invallid for example if the field is a date time field
				// and the user has not fully input a date.
				System.Diagnostics.Debug.WriteLine( "	New Value is Invalid" );
			}

			// You can conditionally cause or prevent the UltraGrid from re-filtering the
			// rows based on the new filter value by setting the ApplyNewFilter to true 
			// or false respectively.
			e.ApplyNewFilter = false;
		}

See Also