Skip to main content

BootstrapGridViewBuilderBase<T>.BindToXPO<TEntity>(XPQuery<TEntity>) Method

Establishes a server-mode data binding via DevExpress eXpress Persistent Objects for .NET (XPO) ORM.

Namespace: DevExpress.AspNetCore.Bootstrap

Assembly: DevExpress.AspNetCore.Bootstrap.v18.2.dll

Declaration

public T BindToXPO<TEntity>(
    XPQuery<TEntity> query
)

Parameters

Name Type Description
query XPQuery<TEntity>

An object of the XPQuery class that specifies a query.

Type Parameters

Name Description
TEntity

The type of the data in a dataset.

Returns

Type Description
T

A reference to this instance after the operation is completed.

Remarks

IMPORTANT

Bootstrap Controls for ASP.NET Core are in maintenance mode. We don’t add new controls or develop new functionality for this product line. Our recommendation is to use the ASP.NET Core Controls suite.

The Grid View control supports data binding in server mode, which is designed to work with large datasets. Using this binding mode, the data-aware operations (sorting, filtering, grouping, etc.) are performed on the data server. This technique significantly improves the Grid View’s speed and responsiveness.

The BindToXPO method is used to establish server-mode data binding using the DevExpress eXpress Persistent Objects for .NET (XPO) ORM. The following code demonstrates the described functionality in detail.

@model XPQuery<Email>

@(Html.DevExpress()
    .BootstrapGridView<Email>("grid")
    .KeyFieldName(k => k.ID)
    .Columns(columns => {
        columns.Add(c => c.From);
        ...
    })
    .Routes(routes => routes
        .MapRoute(r => r.Action("Binding").Controller("GridView")))
    .Bind(Model)

See also the Binding to Large Database using XPO online demo and the Getting Started with .NET Core article.

See Also