The associated band (read-only).
Syntax
| Visual Basic (Declaration) | |
|---|
Public ReadOnly Property Band As UltraGridBand |
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.
| Visual Basic | Copy Code |
|---|
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 |
| C# | Copy Code |
|---|
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( ) );
}
} |
See Also