OnExportContent from RadEditor Fired !

5 posts, 0 answers
  1. Krishna Samaga
    Krishna Samaga avatar
    15 posts
    Member since:
    Oct 2009

    Posted 17 Sep 2010 Link to this post

    Hi ,
    I am using RadEditor . I have implemented the event OnExportContent and is not being fired.
    It was working previously . Here is the code



    telerik:RadEditor ID="_radMergedContent" OnExportContent="_radMergedContent_ExportContent"



    Width="500" Height="450" ToolsFile="~/CommonResources/PDFGeneratorTools.xml"



    OnClientLoad="OnClientLoad" runat="server">



    <ExportSettings Pdf-FontType="Embed" Pdf-PageTopMargin="20" Pdf-PageBottomMargin="20"



    Pdf-PageLeftMargin="20" Pdf-PageRightMargin="20" />





    There is a button "Send Mail"and OnClick of which i set these values

    _radMergedContent.ExportSettings.FileName = GetPDFFileName();

    _radMergedContent.ExportSettings.OpenInNewWindow =




    On execute of the above statement the method _radMergedContent_ExportContent
    needs to be fired but does not happen .

  2. Dobromir
    Dobromir avatar
    1633 posts

    Posted 20 Sep 2010 Link to this post

    Hi Krishna,

    I tried to reproduce the problem using the provided information but to no avail. In the provided sample code couple of items are missing - OnClientLoad event handler method, GetPDFFileName() server-side method. Could you please verify that these methods are executing correctly?

    On a side note, if RadEditor is placed inside update panel this is an expected behavior - in OnExportContent event is fired on a postback. This is not RadEditor's limitation but a general ASP.NET requirement.

    For your convenience I have attached my sample test page and this video demonstrates my test. Could you please modify the attached page to a point where the problem occurs and send it back?

    Kind regards,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Joe
    Joe  avatar
    1 posts
    Member since:
    Oct 2010

    Posted 08 Dec 2011 Link to this post

    I am also having trouble firing off the exportcontent event for the radeditor within an update panel. Your solution does not show an update panel example. Can I not use the radeditor within an update panel? It fires the event fine in a test form not in an update panel. Can you supply an example? Thanks.
  4. Rumen
    Rumen avatar
    14285 posts

    Posted 09 Dec 2011 Link to this post

    Hello Joe,

    RadEditor's Export to PDF functionality cannot be ajaxified. This is because the Form element is modified during the procedure. In order to use ExportToPdf you need to trigger full postback. To achieve this you need to force Button1 to perform postback. You can find a detailed explanation and a solution in the following help article:
    Force controls in ajaxified container to perform PostBack

    Best wishes,
    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. J2K
    J2K avatar
    34 posts
    Member since:
    Sep 2005

    Posted 05 Jan 2013 Link to this post

    Noticed this is in the documentation currently on the Telerik site for ExportContent event:


    This event is raised before a file is deleted using the current content provider. The file delete will be canceled if you return false from the event handler.


    This event is raised before a file is deleted using the current content provider. The file delete will be canceled if you return false from the event handler.

    So apparently, according to Telerik, when the ExportContent is raised, the file your user has labored on is deleted.  Good luck with that.
Back to Top