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

AjaxManager trying to find un-related and un-rendered control?

2 Answers 82 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Marval Group
Top achievements
Rank 2
Marval Group asked on 24 Sep 2008, 09:42 AM
Hi

We have a page using a Prometheus RadAjaxManager control. In simple terms it looks like this:

<RadAjaxManager> 
    <AjaxSettings> 
        <AjaxSetting AjaxControlID="controlOne"
            <UpdatedControls> 
                <AjaxUpdatedControl ControlID="controlOne" /> 
                <AjaxUpdatedControl ControlID="controlTwo" /> 
            </UpdatedControls> 
        </AjaxSetting> 
        <AjaxSetting AjaxControlID="controlTwo"
            <UpdatedControls> 
                <AjaxUpdatedControl ControlID="controlOne" /> 
                <AjaxUpdatedControl ControlID="controlTwo" /> 
            </UpdatedControls> 
        </AjaxSetting> 
        <AjaxSetting AjaxControlID="controlThree"
            <UpdatedControls> 
                <AjaxUpdatedControl ControlID="controlThree" /> 
            </UpdatedControls> 
        </AjaxSetting> 
    </AjaxSettings> 
</RadAjaxManager> 

At certain times controlOne and controlTwo may be hidden and only controlThree shown. However when controlThree makes a callback we get the following JS alert message:

Sys.InvalidOperationException: Could not find UpdatePanel with ID 'controlOnePanel'. If it is being updated dynamically then it must be inside another UpdatePanel.

Any advice appreciated, thanks.

Andrew

2 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 26 Sep 2008, 11:24 AM
Hi marvalbloke,

I suggest that you wrap your "controlThree" into a regular asp:Panel control which is always visible and add it to the ajax settings instead controlThree:

<RadAjaxManager>    
2     <AjaxSettings>    
3         <AjaxSetting AjaxControlID="controlOne">    
4             <UpdatedControls>    
5                 <AjaxUpdatedControl ControlID="controlOne" />    
6                 <AjaxUpdatedControl ControlID="controlTwo" />    
7             </UpdatedControls>    
8         </AjaxSetting>    
9         <AjaxSetting AjaxControlID="controlTwo">    
10             <UpdatedControls>    
11                 <AjaxUpdatedControl ControlID="controlOne" />    
12                 <AjaxUpdatedControl ControlID="controlTwo" />    
13             </UpdatedControls>    
14         </AjaxSetting>    
15         <AjaxSetting AjaxControlID="Panel1">    
16             <UpdatedControls>    
17                 <AjaxUpdatedControl ControlID="Panel1" />    
18             </UpdatedControls>    
19         </AjaxSetting>    
20     </AjaxSettings>    
21 </RadAjaxManager>    
22 <asp:Panel runat="server" ID="Panel1">  
23     place controlThree here and change its visibility but leave the Panel1 as always visible  
24 </asp:Panel> 
 

Let me know if this works for you.

Best wishes,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Dave Miller
Top achievements
Rank 2
answered on 29 Sep 2008, 01:41 PM
Andrew,

I had a similar problem as in this post

http://www.telerik.com/community/forums/thread/b311D-bgeked.aspx

What worked for me was to add the controls to the AjaxProxyManager in the code behind when need like so:

AjaxSetting

ajaxSetting = new Telerik.Web.UI.AjaxSetting("RadAjaxManager1");

ajaxSetting.UpdatedControls.Add(

new AjaxUpdatedControl("ProductList", "RadAjaxLoadingPanel1"));

AjaxManagerProxy1.AjaxSettings.Add(ajaxSetting);

The AjaxManager is on the main page whith the Productlist in the usercontrol

Regards,
Dave

Tags
Ajax
Asked by
Marval Group
Top achievements
Rank 2
Answers by
Iana Tsolova
Telerik team
Dave Miller
Top achievements
Rank 2
Share this question
or