This is a migrated thread and some comments may be shown as answers.

EntityDatasource

1 Answer 62 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bill
Top achievements
Rank 2
Bill asked on 07 Jul 2013, 07:45 PM
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.

1 Answer, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 11 Jul 2013, 08:16 AM
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.
Tags
Grid
Asked by
Bill
Top achievements
Rank 2
Answers by
Marin
Telerik team
Share this question
or