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

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

1 Answer 123 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Xorv
Top achievements
Rank 2
Xorv asked on 11 Jan 2012, 06:37 PM
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

1 Answer, 1 is accepted

Sort by
0
Antonio Stoilkov
Telerik team
answered on 13 Jan 2012, 05:51 PM
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
Tags
Grid
Asked by
Xorv
Top achievements
Rank 2
Answers by
Antonio Stoilkov
Telerik team
Share this question
or