Version

SortedColumnsCollection Class

Returns a collection of sorted column objects. This property is not available at design-time.
Syntax
'Declaration
 
Public Class SortedColumnsCollection 
   Inherits Infragistics.Shared.KeyedSubObjectsCollectionBase
public class SortedColumnsCollection : Infragistics.Shared.KeyedSubObjectsCollectionBase 
Remarks

The SortedCols property is used to access the collection of UltraGridColumn objects associated with an Band. An UltraGridColumn object represents a single column in the grid; it usually corresponds to a data field in the recordset underlying the grid, and it has properties that determine the appearance and behavior of the cells that make up the column.

The UltraGrid can automatically sort the contents of columns without the addition of any code, provided the control is able to preload the rows in the band. Preloading is enabled by default if the recordset bound to the band contains less than 1000 rows. If you do not want to preload rows, but you still want to provide column sorting in the control, you must implement column sorting yourself using the BeforeSortChange and AfterSortChange events.

Column headers can display a sort indicator in a column's header. When clicked and the HeaderClickAction property is set to SortSingle or SortMulti, the SortIndicator property is set to specify the order in which the column will be sorted, and the column is added to a special Columns collection just for sorted columns. This is the collection that is accessed by the SortedCols property.

In addition to adding the column to the UltraGridColumns collection accessed by SortedCols, the control fires the BeforeSortChange and AfterSortChange events so that you can examine the contents of the collection, check the value of the SortIndicator property of each column, and optionally perform the sort.

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