EntityDatasource

2 posts, 0 answers
  1. Bill
    Bill avatar
    175 posts
    Member since:
    Apr 2010

    Posted 07 Jul 2013 Link to this post

    Instead of using just one table to bring back some data (see the following):

    http://demos.telerik.com/aspnet-ajax/grid/examples/databinding/net35datasourcecontrols/defaultcs.aspx

    is it possible to generate a LINQ query based on multiple entities to bring back the data?

    Otherwise, just the one table is good fro DropDowns, but not for querying data against multiple entities and having it come back into the grid.
  2. Marin
    Admin
    Marin avatar
    1045 posts

    Posted 11 Jul 2013 Link to this post

    Hello,

     Yes, it is possible. The databinding in the grid does not depend on how exactly you retrieve the data, whether it's from one or multiple tables. You can simply pass the LINQ query or a collection of objects and it will bind to the returned result.
    If you are using LinqDataSource or EntityDataSource you can use their Selecting event to preform a more complex LINQ query as shown here.
    Again the actual approach of retrieving the data is completely irrelevant to the databinding in the grid.

    Regards,
    Marin
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top