A collection of SortProperty objects.
Don't make your code dependent on the order of records returned by these objects, unless you've explicitly sorted them. By default, if the XPCollection, XPView, XPDataView, or XPCursor is not sorted, records will be returned in an arbitrary order. This mimics the behavior of the SQL SELECT statement used in the same circumstances.
The following example demonstrates how to sort a collection (xpCollectionPerson) in ascending order against a 'Name' field.
using DevExpress.Xpo; using DevExpress.Xpo.DB; SortingCollection sortCollection = new SortingCollection(); sortCollection.Add(new SortProperty("Name", SortingDirection.Ascending)); xpCollectionPerson.Sorting = sortCollection;