Syncfusion.SfDataGrid.XForms
Example 
Syncfusion.SfDataGrid.XForms Namespace > SfDataGrid Class : SortColumnDescriptions Property

SortColumnDescriptions Property

Gets or sets the collection of SortColumnDescription of SfDataGrid. The user can get the columns that represent sorting from the SortColumnDescriptions collection. SfDataGrid also allows the user to programmatically sort the column by adding the to the SortColumnDescriptions collection. The user must set the AllowSorting as true for enabling interactive sorting in a SfDataGrid.
Syntax
public SortColumnDescriptions SortColumnDescriptions {get; set;}

Property Value

The collection of columns which represent sorting.
Remarks
The user can get the columns that represent sorting from the SortColumnDescriptions collection. SfDataGrid also allows the user to programmatically sort the column by adding the to the SortColumnDescriptions collection. The user must specify the column to be sorted in the SortColumnDescription.ColumnName which represents the MappingName of the column and the user can optionally set the direction of sorting to be applied by setting the SortColumnDescription.SortDirection. By default columns will be sorted in the ascending order.
Example
dataGrid.AllowSorting = true;
dataGrid.SortColumnDescriptions.Add (new SortColumnDescription()
    {
        ColumnName = "OrderID",
        SortDirection = ListSortDirection.Descending
    });
AssemblyVersion

Syncfusion.SfDataGrid.XForms: 17.2451.0.34

See Also