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

Nested UpdatePanel - No event fired

1 Answer 76 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 11 Jun 2008, 10:06 PM
I've built a portal site successfully (all docks are created dynamically) after following telerik portal site sample. I also cloned Horoscopes.ascx called sampleScopes which is a little bit different from  Horoscopes.ascx.

For example,  there is a search textbox which user can do search. The dropdown list is inside of an update panel (updatepanel1) and it can be populated dynamically after search. The autopostback for the dropdownlist is turned on. 

Ideally, if user selects item from dropdown list, it should update text of a lable in another update panel (updatepanel2). But somehow, it doesn't work. The event from dropdown list doesn't fire. But if I move the sampleScopes from dock and put it into regular asp.net page, the event fires. I guess there is something to do with dock and its lifecycle.
Thanks,


1 Answer, 1 is accepted

Sort by
0
Obi-Wan Kenobi
Top achievements
Rank 1
answered on 16 Jun 2008, 12:04 PM
I tried the following code and everything seems to be OK.
ASPX:
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
<!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" style="height: 100%">  
<head id="Head1">  
    <title>Untitled Page</title> 
</head> 
<body style="height: 100%">  
    <form id="form1" runat="server" style="height: 100%">  
        <div> 
            <asp:ScriptManager ID="ScriptManager1" runat="server">  
            </asp:ScriptManager> 
            <div> 
                <telerik:RadDockLayout ID="RadDockLayout1" runat="server">  
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">  
                        <ContentTemplate> 
                            <telerik:RadDockZone ID="RadDockZone1" runat="server">  
                                <telerik:RadDock ID="RadDock1" runat="server" Width="150px" AutoPostBack="true" Resizable="true">  
                                    <ContentTemplate> 
                                        <asp:UpdatePanel ID="UpdatePanel2" runat="server">  
                                            <ContentTemplate> 
                                                <asp:DropDownList ID="ddList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddList1_SelectedIndexChanged">  
                                                </asp:DropDownList> 
                                                <asp:Button ID="Button1" Text="PopulateDropDown" runat="server" OnClick="Button1_Click" /> 
                                            </ContentTemplate> 
                                        </asp:UpdatePanel> 
                                    </ContentTemplate> 
                                </telerik:RadDock> 
                            </telerik:RadDockZone> 
                            <telerik:RadDockZone ID="RadDockZone2" runat="server">  
                            </telerik:RadDockZone> 
                        </ContentTemplate> 
                    </asp:UpdatePanel> 
                </telerik:RadDockLayout> 
                <asp:Button ID="btnPostback" runat="server" Text="Postback" /> 
            </div> 
    </form> 
</body> 
</html> 
 

C#:
protected void Page_Load(object sender, EventArgs e)  
    {  
          
        RadDock1.Title = System.DateTime.Now.ToString();  
    }  
    protected void Button1_Click(object sender, EventArgs e)  
    {  
        ListItem imem1 = new ListItem("1");  
        ddList1.Items.Add(imem1);  
        ListItem imem2 = new ListItem("2");  
        ddList1.Items.Add(imem2);  
        ListItem imem3 = new ListItem("3");  
        ddList1.Items.Add(imem3);  
    }  
    protected void ddList1_SelectedIndexChanged(object sender, EventArgs e)  
    {  
        Button1.Text = System.DateTime.Now.ToString();  
    } 

If you  paste some code I'll try to help you.
Tags
Dock
Asked by
Scott
Top achievements
Rank 1
Answers by
Obi-Wan Kenobi
Top achievements
Rank 1
Share this question
or