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
Namespace: Syncfusion.SfDataGrid.XForms
Assembly: Syncfusion.SfDataGrid.XForms.dll
Syntax
public class SortColumnDescription : BindableObject
Constructors
SortColumnDescription()
Initializes a new instance of the SortColumnDescription class.
Declaration
public SortColumnDescription()
Fields
ColumnNameProperty
Identifies the ColumnName Xamarin.Forms.BindableProperty.
Declaration
public static readonly BindableProperty ColumnNameProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Remarks
This Xamarin.Forms.BindableProperty is read-only.
SortDirectionProperty
Identifies the SortDirection Xamarin.Forms.BindableProperty.
Declaration
public static readonly BindableProperty SortDirectionProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Remarks
This Xamarin.Forms.BindableProperty is read-only.
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 |
---|---|
ListSortDirection | The direction of sorting for the given column. The default value is Ascending. |
Examples
dataGrid.AllowSorting = true;
dataGrid.SortColumnDescriptions.Add (new SortColumnDescription()
{
ColumnName = "OrderID",
SortDirection = ListSortDirection.Descending
});