Version

SortCondition Property

Gets or sets the sort condition used to sort the column in the table.
Syntax
'Declaration
 
Public Property SortCondition As SortCondition
public SortCondition SortCondition {get; set;}

Property Value

The SortCondition-derived instance used to sort the column or null of the column is not sorted.
Exceptions
ExceptionDescription
System.InvalidOperationExceptionFrom the setter if column was removed from the table.
Remarks

When a sort condition is set on the column, the SortConditions collection on the SortSettings will be cleared and the new sort condition will be added. To sort by multiple columns, the sort conditions must be added to the SortConditions collection instead of set on the column. However, if a sort condition is cleared with this property, just the sort condition for the column will be removed from the SortConditions collection. All other SortConditions will remain in the collection.

Note: Sort conditions are not constantly evaluated as data within the table changes. Sort conditions are applied to the table only when they are are added or removed on a column in the table or when the ReapplySortConditions method is called.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, 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