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):


    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
    Marin avatar
    1038 posts

    Posted 11 Jul 2013 Link to this post


     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.

    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. DevCraft R3 2016 release webinar banner
Back to Top