RadEditor inside UpdatePanel

4 posts, 0 answers
  1. Renato
    Renato avatar
    16 posts
    Member since:
    Jun 2013

    Posted 13 Aug 2013 Link to this post

    Hi, actually I have the code below working fine, but when I put the RadEditor inside an UpdatePanel to make it asynchronous, the code-behind dont get the RadEditor content value. Is it possible to pass the value inside an UpdatePanel, how? thanks


    <telerik:RadEditor ID="reComment" runat="server" EditModes="Design" ToolbarMode="ShowOnFocus" ToolsWidth="170px" Width="412px" Height="72px">
     
                        <Tools>
                            <telerik:EditorToolGroup>
                                <telerik:EditorTool Name="Bold" />
                                <telerik:EditorTool Name="Italic" />
                                <telerik:EditorTool Name="StrikeThrough" />
                                <telerik:EditorTool Name="Underline" />
                                <telerik:EditorTool Name="InsertUnorderedList" />
                                <telerik:EditorTool Name="InsertOrderedList" />
                            </telerik:EditorToolGroup>
                        </Tools>
                    </telerik:RadEditor>
                    <input id="inpHide" name="inpHide" type="hidden" runat="server" />
                    <span class="exp-bout-comm">
                        <asp:Button ID="btSubmit" runat="server" Text="Valider" OnClick="btSubmit_Click" /></span>


    if (!IsPostBack)
    {
        base.OnLoad(e);
        GetExistingComments();
     
        if (ScriptManager.GetCurrent(Page) == null)
        {
            ScriptManager sMgr = new ScriptManager();
            Page.Form.Controls.AddAt(0, sMgr);
        }
     
        btSubmit.Click += new EventHandler(btSubmit_Click);
     
        if (reComment == null)
        {
            reComment = this.FindControl("reComment") as RadEditor;
        }
     
        string content = reComment.Content;
    }


  2. Rumen
    Admin
    Rumen avatar
    12846 posts

    Posted 13 Aug 2013 Link to this post

    Hello,

    The reported problem is described in the following article: RadEditor Content Not Saved After Ajax Update in IE9, Firefox, Google Chrome and Safari. You can fix it using this code:

    <asp:Button UseSubmitBehavior="false" ID="btSubmit" runat="server" Text="Valider" OnClick="btSubmit_Click" />

    Regards,
    Rumen
    Telerik
    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 the blog feed now.

  3. Renato
    Renato avatar
    16 posts
    Member since:
    Jun 2013

    Posted 14 Aug 2013 Link to this post

    Hi Rumen, I am using this code inside a User Control, when I click save it doenst get the RadEditor content but after a second click it get's the value, any reason for that? thanks

    <%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
    <%@ Assembly Name="Microsoft.Web.CommandUI, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register TagPrefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
    <%@ Import Namespace="Microsoft.SharePoint" %>
    <%@ Register TagPrefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UserControl2.ascx.cs" Inherits="Expertime.PublishingComments.CONTROLTEMPLATES.UserControl2" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2013.2.611.45, Culture=Neutral, PublicKeyToken=121fae78165ba3d4" %>
     
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
        <asp:Panel ID="pnlRadEditor" runat="server">
            <asp:Button ID="btnSave" UseSubmitBehavior="false" runat="server" OnClick="btnSave_Click" Text="Save" />
            <telerik:RadEditor ID="RadEditor1" runat="server" EnableViewState="false"></telerik:RadEditor>
        </asp:Panel>
    </telerik:RadAjaxPanel>

    using System;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
     
    namespace Expertime.PublishingComments.CONTROLTEMPLATES
    {
        public partial class UserControl2 : UserControl
        {
            protected void Page_Load(object sender, EventArgs e)
            {
            }
     
            protected void btnSave_Click(object sender, EventArgs e)
            {
                string content1 = RadEditor1.Content;
            }
        }
    }



  4. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 16 Aug 2013 Link to this post

    Hi Renato,

    I reproduced the problem using the RadEditor control in an Update panel in SharePoint 2013 and I can confirm that this is a bug and I logged it in our database for fixing.

    As a token of gratitude I am updating your Telerik points.

    Also you could follow this feedback portal item, where you could track the bug status, vote or comment

    Regards,
    Ianko
    Telerik
    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 the blog feed now.
Back to Top