开发者

Can i add a RadGrid to a NestedViewTemplate

I am currently using Visual Studio 2008 to develop a hierarchical grid that displays records, its got 3 levels. The code looks roughly like this.

<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>

I have ommited all the code and just provided the skeleton.

The problem i am having is that when i add the Radgrid, the intellisense does not seem to pick it up and visual studio does not add开发者_运维知识库 it to the designer class either.

I have tried viewing it in design view and forcing it to sync and even manually added it to the designer class myself. These solutions have not solved my problem as although the intellisense does pick up the control after adding it manually, the control itself is set to null during run time.

So basically is it possible to add a rad grid in the first place and if so what am i doing wrong.

Thanks in Advance


Turns out that although the control is not being added to the designer class and is not showing up on intellisense, it is still being created.

Managed to get a handle on the control by casting the object thrown by one of its events

RadGrid temp = (RadGrid)sender;

A little update...When adding controls to a nested view template in telerik, it is impossible to obtain a reference in a traditional way from the code behind. this is because everything in a nested view template resides in a naming container. click here for more information.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜