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

[Solved] Issue in accessing radgridview data template elements

4 Answers 198 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rana Pratap
Top achievements
Rank 1
Rana Pratap asked on 07 Sep 2009, 12:59 PM
Hi,

I have created RadGridview and one more child grid inside rowdeatails as shown below

  <telerikGridView:RadGridView Name="theGrid" RowDetailsVisibilityMode="VisibleWhenSelected" SelectionChanged="RowDetailsLoad"  Width="600" Height="400" AutoGenerateColumns="True" FontFamily="Verdana" FontSize="10" ColumnsWidthMode="Auto" ColumnBackground="#FFBDCD97" Canvas.ZIndex="40" >
            <telerikGridView:RadGridView.RowDetailsTemplate>               
                    <DataTemplate x:Name="dtTemp">                      
                        <StackPanel>                         
                            <telerikNavigation:RadTabControl Name="ChildGridTab1" Width="300">
                            <telerikNavigation:RadTabItem Name="ChdTabItem1"></telerikNavigation:RadTabItem>
                            <telerikNavigation:RadTabItem Name="ChdTabItem2"></telerikNavigation:RadTabItem>
                        </telerikNavigation:RadTabControl>                        
                        <telerikGridView:RadGridView Name="theChildGrid" Width="300" Height="300" AutoGenerateColumns="True"             FontFamily="Verdana" FontSize="10" ColumnsWidthMode="Auto" >
                        </telerikGridView:RadGridView>
                        </StackPanel>
                    </DataTemplate>
                </telerikGridView:RadGridView.RowDetailsTemplate>
            </telerikGridView:RadGridView>

I am facing issue in accessing the control named "theChildGrid" at serverside. Please help me how can i access this control and how to bind data to that grid.

Thanks in advance
Regards,
Rana Pratap

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 07 Sep 2009, 01:13 PM
Hi Rana,

You can use sender argument in theChildGrid Loaded event to achieve this.

Sincerely yours,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Abhishek Chauhan
Top achievements
Rank 1
answered on 07 Sep 2009, 03:21 PM
Hi Vlad,

I am also facing the same issue and  I have tried the approach suggested by you but I am still not sure how to bind the data fetched from a web service to the chid grid ( defined inside the row grid data template) as the child grid is not accessible in the asynchronous method call to the web service. Can you please elaborate how to achieve this......if possible with some sample code.

Thanks in advance,
Abhishek
0
Vlad
Telerik team
answered on 08 Sep 2009, 03:09 PM
Hi Abhishek,

You can find small demo application here:
http://www.telerik.com/community/forums/silverlight/gridview/load-on-demand-gridview.aspx

All the best,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Abhishek Chauhan
Top achievements
Rank 1
answered on 09 Oct 2009, 09:41 AM
Thanx a lot Vlad.

Abhishek
Tags
GridView
Asked by
Rana Pratap
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Abhishek Chauhan
Top achievements
Rank 1
Share this question
or