XPBaseCollection.Sorting Property
Gets or sets the sort settings for the current collection.
Namespace: DevExpress.Xpo
Assembly: DevExpress.Xpo.v24.1.dll
NuGet Packages: DevExpress.Win.PivotGrid, DevExpress.Win.TreeMap, DevExpress.Xpo
#Declaration
public SortingCollection Sorting { get; set; }
#Property Value
Type | Description |
---|---|
Sorting |
The Sorting |
#Remarks
Calling the SortingCollection‘s Add, Remove and Clear methods is not allowed. To sort a collection, a new SortingCollection object must be created and assigned to the Sorting property.
using DevExpress.Xpo;
using DevExpress.Xpo.DB;
// ...
xpCollectionPerson.Sorting = new SortingCollection(
new SortProperty("Name", SortingDirection.Ascending)
);
To learn more, see Sorting.
Note
For performance reasons, we recommend that you not use the Join
#Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the Sorting property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.