Skip to main content
All docs
V24.1
.NET Framework 4.5.2+

XpoDataView.DefaultUseServerSideSorting Property

Indicates that the sort operation is executed on the server side before the result set is trimmed according to the TopReturnedObjects property. This field affects all List Views in your application if you do not specify the UseServerSideSorting property for a particular List View.

Namespace: DevExpress.ExpressApp.Xpo

Assembly: DevExpress.ExpressApp.Xpo.v24.1.dll

NuGet Package: DevExpress.ExpressApp.Xpo

Declaration

public static bool DefaultUseServerSideSorting { get; set; }

Property Value

Type Description
Boolean

true if the sort operation is executed on the server side; false if the sort operation is executed on the client side. The default value is true.

Remarks

You can specify the DefaultUseServerSideSorting field on application startup as demonstrated below:

WinForms

File: MySolution.Win\WinApplication.cs(.vb).

using DevExpress.ExpressApp.Win;
using DevExpress.ExpressApp.Xpo;
// ...
public partial class MySolutionWindowsFormsApplication : WinApplication {
    // ...
    public MySolutionWindowsFormsApplication() {
        XpoDataView.DefaultUseServerSideSorting = false;
        // ...
    }
}

ASP.NET Web Forms

File: MySolution.Web\Global.asax.cs(.vb).

using DevExpress.ExpressApp.Web;
using DevExpress.ExpressApp.Xpo;
// ...
public class Global : System.Web.HttpApplication {
    // ...
    protected void Session_Start(object sender, EventArgs e) {
        // ...
        WebApplication webApplication = WebApplication.Instance;
        // ...
        XpoDataView.DefaultUseServerSideSorting = false;
        webApplication.Setup();
        webApplication.Start();
    }
}

The Solution Wizard enables the DefaultUseServerSideSorting property in new projects. For this purpose, the wizard generates new projects with the FrameworkSettings.DefaultSettingsCompatibilityMode property set to Latest.

If you want to specify this option for a specific List View, use the UseServerSideSorting field instead.

Note

With server-side sorting, you can use only persistent and aliased properties in the Sorting criteria. With client-side sorting, you can also use column names.

See Also