The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

CollectionSourceBase.Sorting Property

Specifies the CollectionSourceBase.Collection's sort settings.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v19.2.dll

Declaration

public IList<SortProperty> Sorting { get; set; }
Public Property Sorting As IList(Of SortProperty)
public IList<SortProperty> Sorting { get; set; }
Public Property Sorting As IList(Of SortProperty)
public IList<SortProperty> Sorting { get; set; }
Public Property Sorting As IList(Of SortProperty)

Property Value

Type Description
IList<SortProperty>

A list of SortProperty objects specifying the collection's sort settings.

Property Value

Type Description
IList<SortProperty>

A list of SortProperty objects specifying the collection's sort settings.

Property Value

Type Description
IList<SortProperty>

A list of SortProperty objects specifying the collection's sort settings.

Remarks

When you add/remove the Sorting list items, sorting is immediately applied to the inner collection. Do not add several elements one after another. Instead, populate a temporary SortProperty list and then assign it to Sorting. The example below is taken from the ListView.LoadModelCore method implementation.

List<SortProperty> sorting = new List<SortProperty>();
foreach(IModelSortProperty sortProperty in Model.Sorting) {
    sorting.Add(new SortProperty(sortProperty.PropertyName, sortProperty.Direction));
}
collectionSource.Sorting = sorting;

In this instance, all SortProperty items will be applied simultaneously.

See Also