Version

BandEventArgs Class

Event parameters used for the events that take Band object as its arguments
Syntax
'Declaration
 
Public Class BandEventArgs 
   Inherits System.EventArgs
public class BandEventArgs : System.EventArgs 
Example
Following code shows some of the information available in AfterSortChange event.

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.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid
Imports System.Diagnostics

   Private Sub UltraGrid1_AfterSortChange(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.BandEventArgs) Handles ultraGrid1.AfterSortChange

       ' AfterSortChange gets fired after the user sorts rows or groups rows
       ' by a column. It also gets fired when the user changes the sort direction
       ' of an already sorted column.

       ' Following code prints out columns in the sorted columns collection.
       Debug.WriteLine("AfterSortChange: ")
       Dim i As Integer
       For i = 0 To e.Band.SortedColumns.Count - 1
           Dim sortColumn As UltraGridColumn = e.Band.SortedColumns(i)

           If sortColumn.IsGroupByColumn Then
               Debug.WriteLine("     Grouped by " & sortColumn.Key & " sorted " & sortColumn.SortIndicator.ToString())
           Else
               Debug.WriteLine("     " & sortColumn.Key & " sorted " & sortColumn.SortIndicator.ToString())
           End If
       Next

   End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;

private void ultraGrid1_AfterSortChange(object sender, Infragistics.Win.UltraWinGrid.BandEventArgs e)
{

	// AfterSortChange gets fired after the user sorts rows or groups rows
	// by a column. It also gets fired when the user changes the sort direction
	// of an already sorted column.

	// Following code prints out columns in the sorted columns collection.
	Debug.WriteLine( "AfterSortChange: " );
	for ( int i = 0; i < e.Band.SortedColumns.Count; i++ )
	{
		UltraGridColumn sortColumn = e.Band.SortedColumns[i];

		if ( sortColumn.IsGroupByColumn )
			Debug.WriteLine( "     Grouped by " + sortColumn.Key + " sorted " + sortColumn.SortIndicator.ToString( ) );
		else
			Debug.WriteLine( "     " + sortColumn.Key + " sorted " + sortColumn.SortIndicator.ToString( ) );
	}

}
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