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

3 posts, 0 answers
  1. Marval Group
    Marval Group avatar
    23 posts
    Member since:
    Aug 2012

    Posted 24 Sep 2008 Link to this post


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

    1 <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="controlThree"
    16             <UpdatedControls> 
    17                 <AjaxUpdatedControl ControlID="controlThree" /> 
    18             </UpdatedControls> 
    19         </AjaxSetting> 
    20     </AjaxSettings> 
    21 </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.

  2. Iana Tsolova
    Iana Tsolova avatar
    3388 posts

    Posted 26 Sep 2008 Link to this post

    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:

    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,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Dave Miller
    Dave Miller avatar
    64 posts
    Member since:
    Oct 2004

    Posted 29 Sep 2008 Link to this post


    I had a similar problem as in this post


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


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


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


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


Back to Top