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

DetailTables Foreign Key Data

3 Answers 15 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Scott Marx
Top achievements
Rank 1
Scott Marx asked on 25 Jun 2013, 11:41 PM
How would you use foreign key data to populate the DetailsTables grid?

I am using onneeddatasource to populate the MasterTableView. I am also using linq as my datasource.

3 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 28 Jun 2013, 01:52 PM
Hi,

In order to achieve your goal you could check this online demo application. Although it is not using LINQ the approach is the same. You get the value from the parent TableView and then use it in the select statement, no matter if it is SQL or LINQ syntax.

Regards,
Andrey
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.
0
Scott Marx
Top achievements
Rank 1
answered on 28 Jun 2013, 01:55 PM
I am aware of this concept. I was trying to avoid another call to the DB since the data is already be called on the mastertableview query.
0
Andrey
Telerik team
answered on 01 Jul 2013, 12:54 PM
Hi,

When querying data with LINQ you get a new IQueryable object as result of the query. So, I do not see why you need to make another call to the database. If you have disposed your context in another event handler you may use some offline storage like List or DataSet and then query against that storage instead directly to the database.

Regards,
Andrey
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
Scott Marx
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Scott Marx
Top achievements
Rank 1
Share this question
or