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

Update Panels

3 Answers 139 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Ivan
Top achievements
Rank 1
Ivan asked on 07 Aug 2009, 12:32 PM
Hi

This is what I want to acomplish.

1. when i click b1 (postback p1) only p1 to update

2. when i click b2 (postback p2) only p2 and p3 to update

here is the code and why it's not working correct?

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title></title>  
</head> 
<body> 
    <form id="form1" runat="server">  
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager> 
    <div> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
       <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="p1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="p1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="p2">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="p2" /> 
                    <telerik:AjaxUpdatedControl ControlID="p3" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
        </telerik:RadAjaxManager> 
          
        <asp:Panel ID="p1" runat="server">  
            <%= DateTime.Now.ToString() %> 
            <asp:Button ID="b1" runat="server" Text="b1" /> 
        </asp:Panel> 
          
        <asp:Panel ID="p2" runat="server">  
            <%= DateTime.Now.ToString() %> 
            <asp:Button ID="b2" runat="server" Text="b2" /> 
        </asp:Panel> 
 
        <asp:Panel ID="p3" runat="server">  
            <%= DateTime.Now.ToString() %> 
        </asp:Panel> 
 
          
    </div> 
    </form> 
</body> 
</html> 
 

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 07 Aug 2009, 01:08 PM
Hello Ivan,

Please try to change your code as shown bellow and see if it works as expected:
ASPX:
 <asp:ScriptManager ID="ScriptManager" runat="server">  
        </asp:ScriptManager> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="b1">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="p1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                <telerik:AjaxSetting AjaxControlID="b2">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="p2" /> 
                        <telerik:AjaxUpdatedControl ControlID="p3" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
        <asp:Panel ID="p1" runat="server">  
            <%= DateTime.Now.ToString() %> 
            <asp:Button ID="b1" runat="server" Text="b1" /> 
        </asp:Panel> 
        <asp:Panel ID="p2" runat="server">  
            <%= DateTime.Now.ToString() %> 
            <asp:Button ID="b2" runat="server" Text="b2" /> 
        </asp:Panel> 
        <asp:Panel ID="p3" runat="server">  
            <%= DateTime.Now.ToString() %> 
        </asp:Panel> 

More information about how to use RadAjaxManager control is available here:
Help topic

Sincerely yours,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Ivan
Top achievements
Rank 1
answered on 07 Aug 2009, 01:28 PM
I think this is not working for me. In the real situation b1 and b2 are custom usercontrols that do their own postback with a control inside. how should i configure the radajaxmanager to make this work?
0
Pavlina
Telerik team
answered on 10 Aug 2009, 06:58 AM
Hi Ivan,

To achieve the desired functionality I suggest you add RadAjaxManagerProxy control  inside a WebUserControl and configured the same way as the manager to AJAX-enable the user control.
More information is available in this help article:
RadAjax and WebUserControls

Kind regards,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Ajax
Asked by
Ivan
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Ivan
Top achievements
Rank 1
Share this question
or