Element 'NestedViewSettings' and 'ParentTableRelation' is not supported.

2 posts, 0 answers
  1. Xorv
    Xorv avatar
    19 posts
    Member since:
    Jan 2012

    Posted 11 Jan 2012 Link to this post

    Hi,

    I am using a simple exxample of hierarchical RadGrid to run. But it showing error:-
    1. Element 'NestedViewSettings' is not supported.
    2. Element 'ParentTableRelation' is not supported.

    Please tell why it is so, even when my telerik assembly is already registered in the aspx page.

    here is the code that I use:-
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="RadGrid.aspx.cs" Inherits="RadGrid" %>
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head runat="server">
    <title>Untitled Page</title>
    </head>
    <body>
    <form id="form1" runat="server">
    <div>
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
    <telerik:AjaxSetting AjaxControlID="RadGrid1">
    <UpdatedControls>
    <telerik:AjaxUpdatedControl ControlID="RadGrid1"
    LoadingPanelID="RadAjaxLoadingPanel1" />
    </UpdatedControls>
    </telerik:AjaxSetting>
    </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
    <telerik:RadGrid ID = "radgrid1" runat = "server" DataSourceID="SqlDataSource1" GridLines="None" Skin = "Vista">
    <mastertableview autogeneratecolumns="False" datakeynames="BrandID" datasourceid="SqlDataSource1">
    <RowIndicatorColumn>
    <HeaderStyle Width="20px"></HeaderStyle>
    </RowIndicatorColumn>
    <ExpandCollapseColumn>
    <HeaderStyle Width="20px"></HeaderStyle>
    </ExpandCollapseColumn>
    <Columns>
    <telerik:GridBoundColumn DataField="BrandID" ReadOnly="True" HeaderText="BrandID" SortExpression="BrandID" UniqueName="BrandID" DataType="System.Int32"></telerik:GridBoundColumn>
    <telerik:GridBoundColumn DataField="BrandName" HeaderText="BrandName" SortExpression="BrandName" UniqueName="BrandName"></telerik:GridBoundColumn>
    <telerik:GridBoundColumn DataField="BackGroundImageID" HeaderText="BackGroundImageID" SortExpression="BackGroundImageID" UniqueName="BackGroundImageID" DataType="System.Int32"></telerik:GridBoundColumn>
    <telerik:GridBoundColumn DataField="BackGroundFilePath" HeaderText="BackGroundFilePath" SortExpression="BackGroundFilePath" UniqueName="BackGroundFilePath"></telerik:GridBoundColumn>
    <telerik:GridBoundColumn DataField="DisplayThemeID" HeaderText="DisplayThemeID" SortExpression="DisplayThemeID" UniqueName="DisplayThemeID" DataType="System.Int32"></telerik:GridBoundColumn>
    <telerik:GridBoundColumn DataField="ThumbNailImageID" HeaderText="ThumbNailImageID" SortExpression="ThumbNailImageID" UniqueName="ThumbNailImageID" DataType="System.Int32"></telerik:GridBoundColumn>
    <telerik:GridBoundColumn DataField="SortOrder" HeaderText="SortOrder" SortExpression="SortOrder" UniqueName="SortOrder" DataType="System.Int32"></telerik:GridBoundColumn>
    <telerik:GridBoundColumn DataField="ThumbNailFilePath" HeaderText="ThumbNailFilePath" SortExpression="ThumbNailFilePath" UniqueName="ThumbNailFilePath"></telerik:GridBoundColumn>
    <telerik:GridBoundColumn DataField="PropertiesTitle" HeaderText="PropertiesTitle" SortExpression="PropertiesTitle" UniqueName="PropertiesTitle"></telerik:GridBoundColumn>
    <telerik:GridBoundColumn DataField="PropertiesTitleColor" HeaderText="PropertiesTitleColor" SortExpression="PropertiesTitleColor" UniqueName="PropertiesTitleColor"></telerik:GridBoundColumn>
    <telerik:GridBoundColumn DataField="PropertiesHeader" HeaderText="PropertiesHeader" SortExpression="PropertiesHeader" UniqueName="PropertiesHeader"></telerik:GridBoundColumn>
    <telerik:GridBoundColumn DataField="PropertiesHeaderColor" HeaderText="PropertiesHeaderColor" SortExpression="PropertiesHeaderColor" UniqueName="PropertiesHeaderColor"></telerik:GridBoundColumn>
    </Columns>
    <NestedViewSettings DataSourceID="SqlDataSource2">
    <ParentTableRelation>
    <telerik:GridRelationFields DetailKeyField="BrandID"
    MasterKeyField="BrandID" />
    </ParentTableRelation>
    </NestedViewSettings>
    <NestedViewTemplate>
    <asp:Panel ID="NestedViewPanel" runat="server" CssClass="viewWrap">
    <div class="contactWrap">
    <fieldset style="padding: 10px;">
    <legend style="padding: 5px;"><b>Detail info for Brand: <%#Eval("brandname") %></b>
    </legend>
    <table>
    <tr>
    <td>
    Property Name:
    </td>
    <td>
    <asp:Label ID="titleLabel" Text='<%#Bind("styleguidestitle")%>'
    runat="server"></asp:Label>
    </td>
    </tr>
    <tr>
    <td>
    Property Description:
    </td>
    <td>
    <asp:Label ID="addressLabel" Text='<%#Bind("propertydescription") %>'
    runat="server"></asp:Label>
    </td>
    </tr>
    </table>
    </fieldset>
    </div>
    </asp:Panel>
    </NestedViewTemplate>
    </mastertableview>
    </telerik:RadGrid>
    <asp:SqlDataSource ID="SqlDataSource2" ConnectionString="<$ ConnectionStrings>"
    SelectCommand="
    select brandname, styleguidestitle, * from brandproperty
    inner join property
    on brandproperty.propertyid = property.propertyid
    inner join brand
    on brand.brandid = brandproperty.brandid
    where brand.brandid =@BrandID" runat="server">
    <SelectParameters>
    <asp:Parameter Name="BrandID" />
    </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DAFEConnection %>"
    SelectCommand="Select * from brand"></asp:SqlDataSource>
    </div>
    </form>
    </body>
    </html>

    Thanks
    Xorv
  2. Antonio Stoilkov
    Admin
    Antonio Stoilkov avatar
    530 posts

    Posted 13 Jan 2012 Link to this post

    Hello Xorv,

    Based on your code I have assembled a sample project demonstrating the desired functionality. Additionally, you could go through the article below covering issue similar to yours.

    Greetings,
    Antonio Stoilkov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top