BootstrapGridViewBuilderBase<T>.BindToXPO(Session, Type) 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
#Parameters
Name | Type | Description |
---|---|---|
session | Session | A session that is used to load and save persistent objects. |
object |
Type | The type of an object that describes the target dataset. |
#Returns
Type | Description |
---|---|
T | A reference to this instance after the operation is completed. |
#Remarks
IMPORTANT
Bootstrap Controls for ASP.
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.
@(Html.DevExpress()
.BootstrapGridView("grid")
.KeyFieldName("ID")
.Columns(columns => {
columns.Add("From");
...
})
.Routes(routes => routes
.MapRoute(r => r.Action("Binding").Controller("GridView")))
.BindToXPO(new UnitOfWork(), typeof(Email))
See also the Binding to Large Database using XPO online demo and the Getting Started with .NET Core article.