Hi,
I'm trying to setup a datarelation and am getting the following error:
Literal content ('<igds:DataRelation ParentDataViewID="dvVerificationSummary" ParentColumns="ParentEscalatorID" ChildDataViewID"dvVerificationDetails" ChildColumns="EscalatorID" />') is not allowed within a 'Infragistics.Web.UI.DataSourceControls.DataRelationCollection'.
I'm using the simple examples that are all over the web, so its not anything complex. I've also seen that there are older posts with similar errors on other controls. The few solutions that I saw leaned toward the way the .dll was registered. I don't see anything off with that either. Any help will be greatly appreciated!Thanks, Tami
Here is my code:
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPages/Menu.Master" CodeBehind="BudgetVerification_SumDetails.aspx.cs" Inherits="WebSite.BudgetSetup.BudgetVerification_SumDetails" %>
<%@ Register Assembly="Infragistics35.Web.v10.2, Version=10.2.20102.1011, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.Web.UI.DataSourceControls" TagPrefix="igds" %><%@ Register TagPrefix="uc" TagName="Confirm" Src="~/UserControls/Confirm.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server" ><div id="divVerification"> <igmisc:WebAsyncRefreshPanel ID="warpVerification" runat="server" Height="390px" Width="1075px"> <table id="tblVerification" style="width: 100%" cellspacing="5px"> <tr> <td colspan="2" align="center"> <ig:WebHierarchicalDataGrid ID="grdVerification" runat="server" Height="380px" Width="100%" StyleSetPath="../Stylesheets/" StyleSetName="Default" AutoGenerateBands="true" AutoGenerateColumns="true" DataSourceID="whdsVerification"> <ExpandCollapseAnimation SlideOpenDirection="Auto" SlideOpenDuration="300" SlideCloseDirection="Auto" SlideCloseDuration="300" />
</ig:WebHierarchicalDataGrid> <igds:WebHierarchicalDataSource ID="whdsVerification" runat="server"> <DataRelations> <igds:DataRelation ParentDataViewID="dvVerificationSummary" ParentColumns="ParentEscalatorID" ChildDataViewID"dvVerificationDetails" ChildColumns="EscalatorID" /> </DataRelations> <DataViews> <igds:DataView ID="dvVerificationSummary" DataSourceID="dsrcVerificationSummary" /> <igds:DataView ID="dvVerificationDetails" DataSourceID="dsrcVerificationDetails" /> </DataViews> </igds:WebHierarchicalDataSource> <asp:ObjectDataSource ID="dsrcVerificationSummary" runat="server" SelectMethod="GetBudgetVerificationByBudgetID_Summary" TypeName="PFOM.Business.BudgetSetupManager" onselecting="dsrcVerification_Selecting"> <SelectParameters> <asp:Parameter DefaultValue="" Name="budgetID" Type="Int32" /> </SelectParameters> </asp:ObjectDataSource> <asp:ObjectDataSource ID="dsrcVerificationDetails" runat="server" SelectMethod="GetBudgetVerificationByBudgetID_pivot" TypeName="PFOM.Business.BudgetSetupManager" onselecting="dsrcVerification_Selecting"> <SelectParameters> <asp:Parameter DefaultValue="" Name="budgetID" Type="Int32" /> </SelectParameters> </asp:ObjectDataSource>
</td> </tr> </table> </igmisc:WebAsyncRefreshPanel> </div></asp:Content>
Hi, Assuming you copied this code from your aspx, your problem is in bold. You are missing the '=' sign in ChildDataViewID. Also seem to be missing an Id, but not sure if that's required.
<DataRelations> <igds:DataRelation ParentDataViewID="dvVerificationSummary" ParentColumns="ParentEscalatorID" ChildDataViewID"dvVerificationDetails" ChildColumns="EscalatorID" /> </DataRelations>
As an aside, you might run into problems withe the WHDG inside the WebAsyncRefreshPanel. WHDG uses Microsoft ajax, whereas the WARP uses its own implementation. These can conflict. If you have problems, switch to an Update Panel.
regards,David Young
Thank you! Always nice when someone points out your stupid moves. ha! I added the = sign and removed the WebAsyncRefreshPanel. I am able to get the grid to display now; however, each of my datasources gets called 3 times while loading and then when I click on the expand row, it tries to call the summary datasource again. Why is it calling it so many times if it already has the data it needs?