<telerik:RadMultiPage runat="server" ID="RadMultiPage1" SelectedIndex="0" RenderSelectedPageOnly="false">
<telerik:RadPageView ID="RadPageView1" runat="server">
<telerik:RadGrid ID="radGrd1">
<MasterTableView>
<DetailTables>
<telerik:GridTableView>
<NestedViewTemplate>
<telerik:RadMultiPage>
<telerik:RadPageView>
<%--add Radgrid Here--%>
</telerik:RadPageView>
</telerik:RadMultiPage>
</NestedViewTemplate>
</telerik:GridTableView>
</DetailTables>
</MasterTableView>
</telerik:RadGrid>
</telerik:RadPageView>
Here is a skeleton of the code i am using.Is it possible to add a rad grid in that position? If so why is it that visual studio is not adding this code to the designer class and thus making it inaccessible in the code behind file?
I have tried adding the control manually myself, although it appears in the intellisense the control itself is set to null during runtime thus making it impossible to bind any data to the Grid.
Please Help
9 Answers, 1 is accepted
I recommend that you examine the online example below which demonstrates a similar functionality and let me know if it helps:
http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/nestedviewtemplate/defaultcs.aspx
Regards,
Pavlina
the Telerik team

protected
void
radGrdEnquiriesComments_NeedDataSource(
object
sender, GridNeedDataSourceEventArgs e)
{
RadGrid temp = (RadGrid)sender;
}
However i am still encountering a problem. i would like to bind data to this rad grid when an item is expanded in the details table, could you please point me in the right direction
Attached to this message is a sample working project that demonstrates how you can achieve the desired functionality. Please check it out and see if it works for you.
Sincerely yours,
Pavlina
the Telerik team

Your solution was really appreciated and it shed more insight onto how the tree of controls is built in telerik.
For anyone going through this thread in the future the following code managed to solve the problem at hand
protected
void
radGrdEnquiries_ItemCommand(
object
source, GridCommandEventArgs e)
{
GridDataItem dataItem = e.Item
as
GridDataItem;
GridNestedViewItem nestedItem = (GridNestedViewItem)dataItem.ChildItem;
RadGrid radGrdEnquiriesVarients = (RadGrid)nestedItem.FindControl(
"radGrdEnquiriesVarients"
);
}

Can you please elaborate a bit more what is the exact issue you are facing? It will be best if you isolate the problem in a sample project and send it to us via formal support ticket. Thus we will be able to review it locally and advice you further.
Kind regards,
Pavlina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.


Simply create a new webform and paste this in aspx source window in VS 2010. Look at the designer class. Do you see RadGrid2 in there? Go to the aspx.vb try to reference radgrid2-it does not exist. So, seems there is a little bug here - what is the workaround? I am doing the addhandlers and they are working however where do I define Radgrid2-as a private? A public? Somehow get it to stay in the designer class? Please advise.
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" OnNeedDataSource="RadGrid1_NeedDataSource" OnItemCommand="RadGrid1_ItemCommand">
<MasterTableView DataKeyNames="CustomerID">
<NestedViewTemplate>
<telerik:RadGrid ID="RadGrid2" runat="server" AllowPaging="True" OnNeedDataSource="RadGrid2_NeedDataSource">
</telerik:RadGrid>
</NestedViewTemplate>
</MasterTableView>
</telerik:RadGrid>
</telerik:RadAjaxPanel>
To be able to initialize the inner RadGrid you need to find it first in your upper RadGrid's ItemCreated event as shown below:
void
RadGrid1_ItemCreated(
object
sender, GridItemEventArgs e)
{
if
(e.Item
is
GridNestedViewItem)
{
GridNestedViewItem item = e.Item
as
GridNestedViewItem;
RadGrid grid = (RadGrid)e.Item.FindControl(
"innerGridId"
);
}
Greetings,
Pavlina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.