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

Dataitem Object

3 Answers 27 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 18 Aug 2011, 06:51 PM
Looking for a way to access or store an object from a Linqdatasource foreign key.

I have a Radgrid using a Linqdatasource with a nestedviewtemplate and a RadTabStrip/RadMultiPage. I would like to populate a RadGrid on one of RadMultilPage with the foreign key data from the Master RadGrid.

Is this possible?

3 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 23 Aug 2011, 09:27 AM
Hi Scott,

How is the inner grid bound? If this is done throug hthe NeedDataSource event, there you shuld be able to find the parent GridDataItem and extract all desired values from it. If the grid is bound using DataSource control, then you can add a label in the NestedViewTemplate which would hold the foreign key and will be used for the SelectParameter:
http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/nestedviewtemplate/defaultcs.aspx

Greetings,
Iana
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Scott Marx
Top achievements
Rank 1
answered on 23 Aug 2011, 07:44 PM
I am tring to do this without making another database call.
0
Iana Tsolova
Telerik team
answered on 24 Aug 2011, 09:23 AM
Hi Scott,

For getting the foreign key following one of the suggested approaches, it is not necessary to rebind the outer grid.

All the best,
Iana
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Grid
Asked by
Scott Marx
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Scott Marx
Top achievements
Rank 1
Share this question
or