Class SortColumnDescription
Represents a class for that contains the sorting information like sort column's name and sorting direction based on which sorting for a column is processed in a SfDataGrid.
Inheritance
System.Object
SortColumnDescription
Namespace: Syncfusion.SfDataGrid
Assembly: Syncfusion.SfDataGrid.iOS.dll
Syntax
public class SortColumnDescription : Object
Constructors
SortColumnDescription()
Initializes a new instance of the SortColumnDescription class.
Declaration
public SortColumnDescription()
Properties
ColumnName
Gets or sets the name of the column to be sorted. This property represents the MappingName of the column which should be sorted.
Declaration
public string ColumnName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name of the column to be sorted. |
Examples
dataGrid.AllowSorting = true;
dataGrid.SortColumnDescriptions.Add (new SortColumnDescription()
{
ColumnName = "OrderID"
});
See Also
SortDirection
Gets or sets the direction of sorting for the given column.
Declaration
public ListSortDirection SortDirection { get; set; }
Property Value
Type | Description |
---|---|
System.ComponentModel.ListSortDirection | The direction of sorting for the given column. The default value is System.ComponentModel.ListSortDirection.Ascending. |
Examples
dataGrid.AllowSorting = true;
dataGrid.SortColumnDescriptions.Add (new SortColumnDescription()
{
ColumnName = "OrderID",
SortDirection = ListSortDirection.Descending
});