Embedded ajaxified panels

4 posts, 0 answers
  1. Tomasz M.Lipiński
    Tomasz M.Lipiński avatar
    71 posts
    Member since:
    Nov 2009

    Posted 04 Feb 2010 Link to this post

    Hi,

    There are two panels: PanelB embedded inside PanelA. I would like BUttonA to update the whole PanelA (including PanelB)P but ButtonB - to update PanelB only. 
    The markup is the following:

      <telerik:RadAjaxManager ID="AjaxManager" runat="server">  
        <AjaxSettings> 
          <telerik:AjaxSetting AjaxControlID="ButtonA">  
            <UpdatedControls> 
              <telerik:AjaxUpdatedControl ControlID="PanelA" /> 
            </UpdatedControls> 
          </telerik:AjaxSetting> 
          <telerik:AjaxSetting AjaxControlID="ButtonB">  
            <UpdatedControls> 
              <telerik:AjaxUpdatedControl ControlID="PanelB" /> 
            </UpdatedControls> 
          </telerik:AjaxSetting> 
        </AjaxSettings> 
      </telerik:RadAjaxManager> 
      <div runat="server" id="PanelA">  
        <asp:Button runat="server" ID="ButtonA" Text="ButtonA" /> 
        <%-- some PanelA stuff --%> 
        <div runat="server" id="PanelB">  
          <asp:Button runat="server" ID="ButtonB" Text="ButtonB" /> 
          <%-- some PanelB stuff --%> 
        </div> 
      </div> 
     
    But the effect is that when I click ButtonB the whole PanelA is updated.
    How can I achieve my goal?

    Regards
    Tomasz
  2. Pavlina
    Admin
    Pavlina avatar
    6187 posts

    Posted 08 Feb 2010 Link to this post

    Hello Tomasz,

    In order to achieve the desired functionality, you could remove the RadAjaxManager control from the page and replace the div element with RadAjaxPanel control, PLease give this suggestion a try and let me know if you need further assistance.

    Sincerely yours,
    Pavlina
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
  3. Tomasz M.Lipiński
    Tomasz M.Lipiński avatar
    71 posts
    Member since:
    Nov 2009

    Posted 16 Feb 2010 Link to this post

    Hi,
    No, it's not the matter of replacing RadAjaxManager with RadAjaxPanel.
    First - the attached example is working as expected (it's my fault, I haven't tested it :-( ). The key difference between the working example and not working real case is that in the real case ButtonB is outside PanelB:
        <%-- some PanelA stuff --%>    
        <asp:Button runat="server" ID="ButtonB" Text="ButtonB" />    
        <div runat="server" id="PanelB">     
          <%-- some PanelB stuff --%>    
        </div> 
    The solution is to add ButtonB as an updated control of ButtonB:
          <telerik:AjaxSetting AjaxControlID="ButtonB">     
            <UpdatedControls>    
              <telerik:AjaxUpdatedControl ControlID="PanelB" />    
              <telerik:AjaxUpdatedControl ControlID="ButtonB" />    
            </UpdatedControls>    
          </telerik:AjaxSetting>   
    After this correction all is working fine.

    Regards
    Tomasz
  4. Pavlina
    Admin
    Pavlina avatar
    6187 posts

    Posted 18 Feb 2010 Link to this post

    Hello Tomasz,

    I am sending you a simple working application which handles the desired functionality. Please check it out and let me know if it works as expected or if I am leaving something out.

    I hope this helps.

    Kind regards,
    Pavlina
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top