views:

130

answers:

2

I have a page with Ajax Tab controls, within one of the tabs is a webcontrol that as a Telerik RadGrid, with Edit forms pointing to another web control. That edit form also contains Ajax Tabs and on one of those tabs, there is an Ajax modal popup of yet another webcontrol.

The initial webcontrol works fine when used on it's own page, but the edit form fails to appear when the control is used within the Ajax Tabs as desired. The script manager is throwing the following error:

Microsoft JScript runtime error: Sys.InvalidOperationException: Could not find UpdatePanel with ID 'xxx'. If it is being updated dynamically then it must be inside another UpdatePanel.

Any assistance with this would be appreciated.

A: 

To start off with the troubleshooting, I personally will try to remove parts of the code and thus designate the reason for the error. For example, remove the grid and load the user control dynamically on tab click to see if the problem remains, then remove the inner ajax tab or the modal popup and perform another check, etc.

Dick Lampard
A: 

I resolved the issue by removing the UpdatePanel on the initial tab that contained the WebControl. I'm not clear on why this should have caused the issue though so if anyone can explain that, I'd be interested to find out.

So, for example, I originally had this:

<cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" OnClientActiveTabChanged="TabContainer1_OnChanged"  Visible="true"  >
     <cc1:TabPanel runat="server" ID="TabPriorities">
           <HeaderTemplate>Manage Prioritys</HeaderTemplate>
           <ContentTemplate>
                 <asp:UpdatePanel ID="UpdatePanelPriorities" runat="server" UpdateMode="Conditional">
                   <ContentTemplate>
                      <uc1:PriorityGrid ID="PriorityGrid1" runat="server" />
                   </ContentTemplate>
                 </asp:UpdatePanel>
            </ContentTemplate>
      </cc1:TabPanel>

And I changed it to:

<cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" OnClientActiveTabChanged="TabContainer1_OnChanged"  Visible="true"  >
     <cc1:TabPanel runat="server" ID="TabPriorities">
           <HeaderTemplate>Manage Prioritys</HeaderTemplate>
           <ContentTemplate>

                      <uc1:PriorityGrid ID="PriorityGrid1" runat="server" />

            </ContentTemplate>
      </cc1:TabPanel>

And that resolved the script error coming out of the user control which also contained ajax tabs and a modal popup.

Amy Young