Version

HasSortedColumns Property

Returns true if there are any sorted columns in the band.
Syntax
'Declaration
 
Public ReadOnly Property HasSortedColumns As Boolean
public bool HasSortedColumns {get;}
Example
HasSortedColumns indicates if there any columns in the UltraGridBand.SortedColumns. It can be used to find out if the rows in a band are sorted. Following code prints out the value of HasSortedColumns before and after sorting rows.

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

   Private Sub Button140_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button140.Click

       Dim band As UltraGridBand = Me.UltraGrid1.DisplayLayout.Bands(0)

       ' Clear any sorting.
       band.SortedColumns.Clear()

       Debug.WriteLine("Before: " & band.HasSortedColumns)

       ' Sort the rows by the first column.
       band.SortedColumns.Add(band.Columns(0), False)

       Debug.WriteLine("After: " & band.HasSortedColumns)

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

private void button140_Click(object sender, System.EventArgs e)
{

	UltraGridBand band = this.ultraGrid1.DisplayLayout.Bands[0];

	// Clear any sorting.
	band.SortedColumns.Clear( );

	Debug.WriteLine( "Before: " + band.HasSortedColumns );

	// Sort the rows by the first column.
	band.SortedColumns.Add( band.Columns[0], false );

	Debug.WriteLine( "After: " + band.HasSortedColumns );

}
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