'Declaration Public Delegate Sub BandEventHandler( _ ByVal sender As Object, _ ByVal e As BandEventArgs _ )
public delegate void BandEventHandler( object sender, BandEventArgs e )
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( ) ); } }
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