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

Hierarchical RadGrid + NestedViewTemplate + RadGrid

2 Answers 42 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dustin
Top achievements
Rank 1
Dustin asked on 13 Nov 2014, 08:40 PM
Hi there,

I apologize in advance if there is already a solution to this problem, but I've been searching all morning.

I have a Hierarchical Rad Grid that uses a NestedViewTemplate.  I use an ObjectDataSource for the parent grid that provides the columns 'CreatedBy' and 'CreatedOn' (string and datetime, respectively).

I'd like to display these values in the child RadGrid without having to make a separate call to the database.

How do I access these values from a nested RadGrid?  Outside of the RadGrid, the standard Eval("CreatedBy") works.

Thanks,
Dustin

2 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 18 Nov 2014, 11:44 AM
Hello Dustin,

I am not sure that I understand your exact scenario, but if your child RadGrid is within the NestedViewTemplate, the only way for getting values from the parent grid would be to use get reference to the parent GridDataItem (corresponding to the NestedViewTemplate) and either access a column that hold the value that you need or include the data fields in the parent grid DataKeyNames collection and retrieve the values from the GridDataItem with GetDataKeyValue("dataField").

If you have other questions, please elaborate on your exact scenario, so we can give you more specific suggestions.


Regards,
Konstantin Dikov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Dustin
Top achievements
Rank 1
answered on 18 Nov 2014, 01:34 PM
That's exactly what I ended up doing.

Thanks :)
Tags
Grid
Asked by
Dustin
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Dustin
Top achievements
Rank 1
Share this question
or