MasterPage and RadAjaxManager, cause RadEditor not work

4 posts, 1 answers
  1. Ray
    Ray avatar
    8 posts
    Member since:
    Jul 2011

    Posted 30 Oct 2011 Link to this post

    I use MasterPage .
    In master page, I put RadScriptManager and RadAjaxManager in it.
    In child page, I put RadAjaxManagerProxy in it. A RadAjaxPanel with several controls in it.
    Two buttons controls the RadAjaxPanel's sub-controls visibilty.
    When RadEditor set visible=false, then set visible=true, the RadEditor will not work.


    Site1.Master
    <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs" Inherits="TestRadControlMP.Site1" %>
      
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
      
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      
    <head runat="server">
        <title></title>
        <asp:ContentPlaceHolder ID="head" runat="server">
        </asp:ContentPlaceHolder>
    </head>
    <body>
        <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        </telerik:RadAjaxManager>
        <div>
            <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
              
            </asp:ContentPlaceHolder>
        </div>
        </form>
    </body>
    </html>

    Site1.Master.cs
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
      
    namespace TestRadControlMP
    {
        public partial class Site1 : System.Web.UI.MasterPage
        {
            protected void Page_Load(object sender, EventArgs e)
            {
      
            }
        }
    }


    WebForm1.aspx
    <%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"
        CodeBehind="WebForm1.aspx.cs" Inherits="TestRadControlMP.WebForm1" %>
      
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    </asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
        <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="Button1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="Button2">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManagerProxy>
        <br />
        1. Click Button2
        <br />
        2. Click Button1
        <br />
        3. RadEditor、RadComboBox does not work.
        <br />
        <asp:Button ID="Button1" runat="server" Text="Button1" 
            onclick="Button1_Click" />
        <asp:Button ID="Button2" runat="server" Text="Button2" 
            onclick="Button2_Click" />
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px" Width="300px">
            <telerik:RadEditor ID="RadEditor1" runat="server">
            </telerik:RadEditor>
            <telerik:RadTextBox ID="RadTextBox1" runat="server">
            </telerik:RadTextBox>
            <telerik:RadComboBox ID="RadComboBox1" runat="server">
                <Items>
                    <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem1" 
                        Value="RadComboBoxItem1" />
                    <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem2" 
                        Value="RadComboBoxItem2" />
                </Items>
            </telerik:RadComboBox>
        </telerik:RadAjaxPanel>
    </asp:Content>

    WebForm1.aspx.cs
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
      
    namespace TestRadControlMP
    {
        public partial class WebForm1 : System.Web.UI.Page
        {
            protected void Page_Load(object sender, EventArgs e)
            {
      
            }
      
            protected void Button1_Click(object sender, EventArgs e)
            {
                RadEditor1.Visible = true;
                RadTextBox1.Visible = true;
                RadComboBox1.Visible = true;
            }
      
            protected void Button2_Click(object sender, EventArgs e)
            {
                RadEditor1.Visible = false;
                RadTextBox1.Visible = false;
                RadComboBox1.Visible = false;
            }
        }
    }


    Web.Config
    <?xml version="1.0"?>
    <configuration>
      <system.web>
        <compilation debug="true" targetFramework="4.0">
          <assemblies>
            <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
            <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
            <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
          </assemblies>
        </compilation>
        <httpHandlers>
          <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
        </httpHandlers>
      </system.web>
      <system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
        <handlers>
          <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />
        </handlers>
      </system.webServer>
    </configuration>
  2. Ray
    Ray avatar
    8 posts
    Member since:
    Jul 2011

    Posted 31 Oct 2011 Link to this post

    hoping for help...
  3. Answer
    Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 02 Nov 2011 Link to this post

    Hi Ray,

    Note that it is not supported scenarios to have RadAjaxPanels added in the RadAjaxManager settings or use the both controls for updating the same part of the page. Please replace the RadAjaxPanel with regular asp Panel control, add this panel to the RadAjaxManager settings and verify of this makes any difference.


    Kind regards,
    Maria Ilieva
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  4. Ray
    Ray avatar
    8 posts
    Member since:
    Jul 2011

    Posted 03 Nov 2011 Link to this post

    to Maria Ilieva:

      Thanks for your help !

      I followed your advise, replace the RadAjaxPanel with asp Panel , and now it works very well.

     Thank you !
Back to Top