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

Embedded ajaxified panels

3 Answers 50 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Tomasz M.Lipiński
Top achievements
Rank 1
Tomasz M.Lipiński asked on 04 Feb 2010, 11:39 AM
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

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 08 Feb 2010, 12:58 PM
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.
0
Tomasz M.Lipiński
Top achievements
Rank 1
answered on 16 Feb 2010, 12:56 PM
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
0
Pavlina
Telerik team
answered on 18 Feb 2010, 03:27 PM
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.
Tags
Ajax
Asked by
Tomasz M.Lipiński
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Tomasz M.Lipiński
Top achievements
Rank 1
Share this question
or