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

Issues loading data in details template

1 Answer 26 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Srujana
Top achievements
Rank 1
Srujana asked on 01 Mar 2011, 05:40 PM
 

Hello,

I am trying to implement almost the same functionality that you have in your Firstlook example for Silverlight gridview, there is a tab controls in details template which has couple of gridviews in each tab item. I am trying to load the data in details section as load on demand, which is done in code behind, when I tried to find the child control usind "RadGridView childGrid = e.DetailsElement.FindName("gridParam") as RadGridView;" it loads the same data in every row (as opposed to just that row details),
I tried to get the child control in that particular row using both ways below with no luck.First one fails and throws error "Reference is not a valid visual DependencyObject" and second one doesn't find that control, so it throws null reference exception.

RadGridView childGrid = row.DetailsTemplate.FindChildByType<RadGridView>().FindName("gridParam") as RadGridView;
RadGridView childGrid = row.ChildrenOfType<RadGridView>().Where(c=>c.Name=="gridParam") as RadGridView;

 

Any input on this is greatly appriciated.

Thanks in advance,
srujana.

 

1 Answer, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 07 Mar 2011, 11:33 AM
Hello Srujana,

I have prepared a sample project for you that replicates a similar case. Please, have a look at it and inform us if it fits into your requirements.


Greetings,
Ivan Ivanov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
GridView
Asked by
Srujana
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Share this question
or