Is there any way to get the RadEditor to work in this scenario?

6 posts, 1 answers
  1. Boris
    Boris avatar
    289 posts
    Member since:
    Oct 2012

    Posted 30 Apr 2013 Link to this post

    I've got a simple popup implemented in my RadGrid.  This is called by double-clicking on a grid row, which results in a client side call of window.radopen(filename, etc).  

    What I've been trying to do is add a RadEditor and I've found the hard way that this does not work.  Even though the editor is enabled and getting the right data, nothing is displaying and I cannot edit.

    I have looked at this (http://www.telerik.com/help/aspnet-ajax/window-troubleshooting-radeditor-in-radwindow.html) but this is not the overall scenario I'm using.  I've also tried doing this in the aspx but that has no effect.

        $(document).ready(function () {
                    fixEditor();
                })




    Is there any way to fix this or do I need to completely rethink my scenario?
  2. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 01 May 2013 Link to this post

    Hi Boris,

    I am not quite sure why the solution in the article that you have linked is not working in your case and to be able to provide more to the point answer we will need a sample project with the exact implementation so we can examine and debug it locally. Could you please open a formal support ticket and provide the detailed information?

    Also, another possible approach to workaround this issue is to use RadWindow to display an external page containing RadEditor - set RadWindow's NavigateUrl property.

    All the best,
    Dobromir
    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.
  3. Boris
    Boris avatar
    289 posts
    Member since:
    Oct 2012

    Posted 01 May 2013 Link to this post

    Cancel everything.  It took some trial and error but I've found the problem.  The RadEditor works fine in a window.radopen popup.

    However....

    If there is a RadComboBox on the same screen with a OnClientSelectedIndexChanged property that points to a JavaScript function that is missing, that disables every RadEditor on the screen.

    ?????????

  4. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 01 May 2013 Link to this post

    Hi Boris,

    Please find attached sample page demonstrating the approach that I have suggested in my previous post using radopen() function to open non-predefined RadWindow.

    The first parameter of the radopen() function is an URL of the external page that should be opened. More information regarding RadWindow and RadWindowManager client-side APIs is available in the following help articles:
    http://www.telerik.com/help/aspnet-ajax/window-programming-radwindow-methods.html
    http://www.telerik.com/help/aspnet-ajax/window-programming-radwindowmanager-methods.html

    Regards,
    Dobromir
    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.
  5. Boris
    Boris avatar
    289 posts
    Member since:
    Oct 2012

    Posted 02 May 2013 Link to this post

    Sorry but that demo bears no relationship to what I am doing.

    However I did have time to create a demo illustrating the bug.  (No code-behind needed.)

    ----------------------
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication4.WebForm1" %>

    <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

    <!DOCTYPE html>

    <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">
                <Scripts>
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js">
                    </asp:ScriptReference>
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js">
                    </asp:ScriptReference>
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js">
                    </asp:ScriptReference>
                </Scripts>
            </telerik:RadScriptManager>
            <br />
            Test form.&nbsp; The content area of the RadEditor becomes read-only if the OnClientSelectedIndexChanged property of a RadComboBox is
            <br />
            set to a non-existent JavaScript function. Remove that and the RadEditor functions normally.<br />
            <br />
            This app created with Telerik Web UI version 2012.2.607.40<br />
            <br />
        <div>
        
            <telerik:RadEditor ID="RadEditor1" Runat="server">
            </telerik:RadEditor>
            <telerik:RadComboBox ID="RadComboBox1" Runat="server" OnClientSelectedIndexChanged="blahblah">
            </telerik:RadComboBox>
            <br />
            <br />
        
        </div>
        </form>
    </body>
    </html>

  6. Answer
    Rumen
    Admin
    Rumen avatar
    13889 posts

    Posted 06 May 2013 Link to this post

    Hello,

    I am glad that you have found the reason for the problem.

    When the OnClientSelectedIndexChanged property of the combo tries to execute a non-existing function, this generates a JavaScript error which breaks the scripts loading. That is why the editor is loaded disabled, because its scripts are not loaded by the browser due to the error. This is not a bug of the editor or the combo and the only way to be avoided is to double check the controls configuration.

    Best regards,
    Rumen
    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.
Back to Top