Version

AfterSortChange Event

Occurs after a set of UltraTreeNodeColumn objects are sorted.
Syntax
'Declaration
 
Public Event AfterSortChange As AfterSortChangeEventHandler
public event AfterSortChangeEventHandler AfterSortChange
Event Data

The event handler receives an argument of type AfterSortChangeEventArgs containing data related to this event. The following AfterSortChangeEventArgs properties provide information specific to this event.

PropertyDescription
OriginalSortedColumns Returns the SortedColumnsCollection instance which represents which represents the UltraTreeNodeColumn objects that are being sorted.
Example
The following code sample demonstrates how to use the BeforeSortChange and AfterSortChange events.

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.Win
Imports Infragistics.Win.Layout
Imports Infragistics.Win.UltraWinTree

    Private Sub ultraTree1_AfterSortChange(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinTree.AfterSortChangeEventArgs) Handles ultraTree1.AfterSortChange
        Debug.WriteLine("Column '" + e.OriginalSortedColumns(0).TextResolved + "' was sorted.")
    End Sub

    Private Sub ultraTree1_BeforeSortChange(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinTree.BeforeSortChangeEventArgs) Handles ultraTree1.BeforeSortChange
        '   Disallow sorting more than one column
        If e.SortedColumns.Count > 1 Then e.Cancel = True
    End Sub
using Infragistics.Win;
using Infragistics.Win.Layout;
using Infragistics.Win.UltraWinTree;
using System.Diagnostics;

		private void ultraTree1_AfterSortChange(object sender, Infragistics.Win.UltraWinTree.AfterSortChangeEventArgs e)
		{
			Debug.WriteLine( "Column '" + e.OriginalSortedColumns[0].TextResolved + "' was sorted.");
		}

		private void ultraTree1_BeforeSortChange(object sender, Infragistics.Win.UltraWinTree.BeforeSortChangeEventArgs e)
		{
			//   Disallow sorting more than one column
			if ( e.SortedColumns.Count > 1 )
				e.Cancel = true;
		}
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