.NET Core 3.0+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

IModelSorting Interface

The Sorting node provides access to the sort settings applied to the collection of the List View's Collection Source.

Namespace: DevExpress.ExpressApp.Model

Assembly: DevExpress.ExpressApp.v20.1.dll


public interface IModelSorting :
Public Interface IModelSorting
    Inherits IModelNode,
             IModelList(Of IModelSortProperty),
             IList(Of IModelSortProperty),
             ICollection(Of IModelSortProperty),
             IEnumerable(Of IModelSortProperty),


This interface is a part of the Application Model infrastructure. You do not need to implement this interface in most cases.


Sorting, specified in the IModelSorting node is applied to the underlying data source. It may be overridden by sorting specified for the bound control (see IModelColumn.SortOrder).

The IModelSorting node represents a list of the IModelSortProperty nodes. You can add SortProperty child nodes to specify sorting applied to the collection of the List View's Collection Source. For instance, this setting has effect when the IModelListView.TopReturnedObjects property is specified. An example is available in the XCRM demo (see the Views | ITop5Customers_ListView node). This demo is located in the %PUBLIC%\Documents\DevExpress Demos 20.1\Components.NET Core Desktop Libraries\eXpressApp Framework\XCRM folder.

Settings specified in the IModelSorting node have no effect in List Views where the PropertyCollectionSource is used. Nested List Views of collection properties and lookup List Views of properties decorated with the DataSourceProperty attribute use this Collection Source. In the PropertyCollectionSource class, the CollectionSourceBase.CanApplySorting default value is set to false to avoid overriding the sorting specified in a collection property getter accidentally. To change the CanApplySorting value to true, use the following View Controller:

using DevExpress.ExpressApp;
// ...
public class MyViewController : ViewController<ListView> {
    public MyViewController() {
        this.TargetObjectType = typeof(MyBusinessObject);
        this.TargetViewNesting = DevExpress.ExpressApp.Nesting.Nested;
    protected override void OnActivated() {
        this.View.CollectionSource.CanApplySorting = true;
See Also