'Declaration Public ReadOnly Property SortedColumns As SortedColumnsCollection
public SortedColumnsCollection SortedColumns {get;}
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; }
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