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

Problem with Update Nested RadAjaxPanel

1 Answer 146 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
mehdi
Top achievements
Rank 1
mehdi asked on 30 Sep 2011, 05:18 PM
I create a RadAjaxPanel with some of inside controls.one of inside control is a nested radajax
with a TextBox and a button.both of radajaxpanel update mode are always(in code behind).
when i click on button in nested radajax parent radajax will be update an nested radajax will be hide!!Why?
I test this scenario with updatepanel and worked correct...

 Markup:
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" 
            onajaxsettingcreated="RadAjaxPanel1_AjaxSettingCreated1">
  
            <asp:TextBox runat="server" ID="txt2" />
            <asp:Button  Text="but1" ID="but"  runat="server" onclick="but_Click" />
              
        <telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server" Height="200px" 
                Width="300px" onajaxsettingcreated="RadAjaxPanel2_AjaxSettingCreated">
            <asp:TextBox runat="server" ID="txt" />
            <asp:Button Text="but2" ID="but2" runat="server" onclick="but2_Click" />
        </telerik:RadAjaxPanel>
  
        </telerik:RadAjaxPanel>

Code Behind:
protected void but_Click(object sender, EventArgs e)
        {
            txt.Text = "ok";
            txt2.Text = "ok";
        }
  
        protected void but2_Click(object sender, EventArgs e)
        {
            txt.Text = "ok";
            txt2.Text = "ok";
        }
  
        protected void RadAjaxPanel1_AjaxSettingCreated1(object sender, Telerik.Web.UI.AjaxSettingCreatedEventArgs e)
        {
            e.UpdatePanel.UpdateMode = UpdatePanelUpdateMode.Always;
        }
        protected void RadAjaxPanel2_AjaxSettingCreated(object sender, Telerik.Web.UI.AjaxSettingCreatedEventArgs e)
        {
            e.UpdatePanel.UpdateMode = UpdatePanelUpdateMode.Always;
        }

1 Answer, 1 is accepted

Sort by
0
Edward
Top achievements
Rank 1
answered on 30 Sep 2011, 08:49 PM
Correct me if I am wrong but somewhere I read that having nested ajax panels is non supported continuity and you probably need to use the Manager. Also if the panels have UpdatePanelUpdateMode set to 'always' there is no point of the inner panel because either way the whole Panel1 would be updated right?

Cheers,
ExS
Tags
Ajax
Asked by
mehdi
Top achievements
Rank 1
Answers by
Edward
Top achievements
Rank 1
Share this question
or