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

[Solved] Control Referencing in NestedViewTemplate

2 Answers 139 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Zlatko Rusev
Top achievements
Rank 1
Zlatko Rusev asked on 10 Nov 2009, 07:42 AM
Hello,

I use a RadGrid2, inside it's master table  I have a NestedViewTemplate with a RadTabStrip inside I have a RadGrid2. control. So, my question is how I create referancing to  RadGrid2. I would like to set some column properties.create

Thanks for your effort answer me
Z.Rusev

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 10 Nov 2009, 08:46 AM
Hello Z.Rusev,

You can access the Nested Grid in the ItemCreated/ItemDataBound event of the parent grid as shown in the example below:

c#:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)  
    {  
        if (e.Item is GridNestedViewItem)  
        {  
            GridNestedViewItem nestedItem = (GridNestedViewItem)e.Item;  
            RadGrid grid = (RadGrid)nestedItem.FindControl("RadGrid2");  
             ...
        }  
   }  

Thanks
Princy.
0
Zlatko Rusev
Top achievements
Rank 1
answered on 10 Nov 2009, 09:53 AM
thanks
Tags
Grid
Asked by
Zlatko Rusev
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Zlatko Rusev
Top achievements
Rank 1
Share this question
or