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

[Solved] Nested Grid problem

1 Answer 101 Views
Grid
This is a migrated thread and some comments may be shown as answers.
asfand yar
Top achievements
Rank 1
asfand yar asked on 21 Nov 2009, 08:45 AM
i have a grid
inside that gird i have Itemtemplate
and in that itemtemplate i have Div
and in that DIV i have an other Grid
This inner grid is not accessable by FindControl

Every thing was working Fine before i added this extra div to hide inner Grid on some event

Any solution plz
?


1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 23 Nov 2009, 06:14 AM
Hello asfand yar,

You can access the RadGrid nested inside the ItemTemplate of the grid just like any other GridDataItem. Here's an example:
c#:
 protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) 
    { 
        if (e.Item is GridDataItem) 
        { 
            GridDataItem dataItem = (GridDataItem)e.Item; 
            RadGrid grid = (RadGrid)dataItem.FindControl("MyRadGrid"); 
        } 
    } 

Hope this helps :)
Princy.


Tags
Grid
Asked by
asfand yar
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or