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

sender
e
Delegate for BeforeRowFilterChanged event.

Syntax

Visual Basic (Declaration) 
Public Delegate Sub BeforeRowFilterChangedEventHandler( _
   ByVal sender As Object, _
   ByVal e As BeforeRowFilterChangedEventArgs _
) 
C# 
public delegate void BeforeRowFilterChangedEventHandler( 
   object sender,
   BeforeRowFilterChangedEventArgs e
)

Parameters

sender
e

Example

The Following code snippets print out the key of the column the user modifies the fitler conditions for.

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_BeforeRowFilterChanged(sender As Object, e As Infragistics.Win.UltraWinGrid.BeforeRowFilterChangedEventArgs)

   ' The ProcessMode property of the BeforeRowFilterChangedEventArgs event argument provides the ability
   ' to specify whether sorting and filtering of rows will occur synchronously or lazily.
   ' This can be usefull in situations where the grid contains a large number of records
   ' and the developer wishes to display a wait cursor during the sort or filter.  By default the grid applies
   ' sorting and filtering lazily to rows in each band as it is expanded.  If the ProccessMode property
   ' is set to either Synchronous or SynchronousExpanded the developer can ensure that either all rows
   ' in all bands, or all expanded rows in all bands are synchronously sorted and filtered, i.e., all at once.
   ' If a more fine grained approach is desired the RowsCollection overloaded EnsureSortedAndFiltered method can be used
   ' to specify how far down in the hierarchy of bands synchronous sorting and filtering should be applied.
   ' Setting the ProcessMode to Lazy specifies that the grid should apply sorting and filtering lazily
   ' to rows in each band as it is expanded.  This is the default behavior of the grid.
   e.ProcessMode = ProcessMode.Lazy
   
   ' Setting the ProcessMode to Synchronous specifies that the grid should apply sorting and filtering
   ' synchronously to all rows in all bands.
   e.ProcessMode = ProcessMode.Synchronous
   
   ' Setting the ProcessMode to SynchronousExpanded specifies that the grid should apply sorting and filtering
   ' synchronously to all expanded rows in all bands.
   e.ProcessMode = ProcessMode.SynchronousExpanded
   
   ' This code specifies that a wait cursor should be displayed when a user modifies a filter for a column
   ' and ensures that all rows in all bands are sorted while the wait cursor is displayed.
   ' The cursor should be reset in the grid's AfterRowFilterChanged event.
   e.ProcessMode = ProcessMode.Synchronous
   Me.ultraGrid1.Cursor = Cursors.WaitCursor

End Sub 'ultraGrid1_BeforeRowFilterChanged


Private Sub UltraGrid1_AfterRowFilterChanged(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.AfterRowFilterChangedEventArgs) Handles UltraGrid1.AfterRowFilterChanged
   
	' Reset the wait cursor
	Me.ultraGrid1.Cursor = Cursors.Default

   Debug.WriteLine("Rowfilters changed for column: " & e.Column.Key)

End Sub
C#Copy Code
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;

      private void ultraGrid1_BeforeRowFilterChanged(object sender, Infragistics.Win.UltraWinGrid.BeforeRowFilterChangedEventArgs e)
      {
          // The ProcessMode property of the BeforeRowFilterChangedEventArgs event argument provides the ability
          // to specify whether sorting and filtering of rows will occur synchronously or lazily.
          // This can be usefull in situations where the grid contains a large number of records
          // and the developer wishes to display a wait cursor during the sort or filter.  By default the grid applies
          // sorting and filtering lazily to rows in each band as it is expanded.  If the ProccessMode property
          // is set to either Synchronous or SynchronousExpanded the developer can ensure that either all rows
          // in all bands, or all expanded rows in all bands are synchronously sorted and filtered, i.e., all at once.
          // If a more fine grained approach is desired the RowsCollection overloaded EnsureSortedAndFiltered method can be used
          // to specify how far down in the hierarchy of bands synchronous sorting and filtering should be applied.

          // Setting the ProcessMode to Lazy specifies that the grid should apply sorting and filtering lazily
          // to rows in each band as it is expanded.  This is the default behavior of the grid.
          e.ProcessMode = ProcessMode.Lazy;

          // Setting the ProcessMode to Synchronous specifies that the grid should apply sorting and filtering
          // synchronously to all rows in all bands.
          e.ProcessMode = ProcessMode.Synchronous;

          // Setting the ProcessMode to SynchronousExpanded specifies that the grid should apply sorting and filtering
          // synchronously to all expanded rows in all bands.
          e.ProcessMode = ProcessMode.SynchronousExpanded;

          // This code specifies that a wait cursor should be displayed when a user modifies a filter for a column
          // and ensures that all rows in all bands are sorted while the wait cursor is displayed.
          // The cursor should be reset in the grid's AfterRowFilterChanged event.
          e.ProcessMode = ProcessMode.Synchronous;
          this.ultraGrid1.Cursor = Cursors.WaitCursor;
      }


		 private void ultraGrid1_AfterRowFilterChanged(object sender, Infragistics.Win.UltraWinGrid.AfterRowFilterChangedEventArgs e)
		 {
			  // Reset the wait cursor
			  this.ultraGrid1.Cursor = Cursors.Default;

			  Debug.WriteLine( "Rowfilters changed for column: " + e.Column.Key );
		 }

See Also