Skip to content

Use the BindToLINQ method to bind the GridView extension to a LINQ to XPO data source.

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/asp-net-mvc-grid-bind-to-xpo-in-server-mode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grid View for ASP.NET MVC - How to bind grid to XPO in server mode

This example demonstrates how to use the GridViewExtension.BindToLINQ method to bind the GridView extension to a LINQ to XPO data source.

@Html.DevExpress().GridView(settings => {
    settings.Name = "gvDataBindingToLinq";
    // ...
}).BindToLINQ(string.Empty, string.Empty, (s, e) => {
    e.KeyExpression = "Oid";
    DevExpress.Xpo.Session session = XpoHelper.GetNewSession();
    DevExpress.Xpo.XPQuery<MyObject> query = new DevExpress.Xpo.XPQuery<MyObject>(session);
    e.QueryableSource = query;
}).GetHtml()

Files to Review

Documentation

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

Use the BindToLINQ method to bind the GridView extension to a LINQ to XPO data source.

Topics

Resources

License

Stars

Watchers

Forks