Skip to main content

SortDescriptions Property

Gets the Sort criteria to sort items in collection.

Definition

Namespace: Avalonia.Collections
Assembly: Avalonia.Controls.DataGrid (in Avalonia.Controls.DataGrid.dll)

public DataGridSortDescriptionCollection SortDescriptions { get; }

Property Value

DataGridSortDescriptionCollection

Implements

IDataGridCollectionView.SortDescriptions

Remarks

Clear a sort criteria by assigning SortDescription.Empty to this property. One or more sort criteria in form of can be used, each specifying a property and direction to sort by.

Exceptions

NotSupportedExceptionSimpler implementations do not support sorting and will throw a NotSupportedException. Use property to test if sorting is supported before adding to SortDescriptions.

See Also

Reference

DataGridCollectionView Class
Avalonia.Collections Namespace
DataGridSortDescription
CanSort