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

OnExportContent from RadEditor Fired !

4 Answers 89 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Krishna Samaga
Top achievements
Rank 1
Krishna Samaga asked on 17 Sep 2010, 02:59 PM
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" />

 

 

</telerik:RadEditor>

 



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

_radMergedContent.ExportSettings.FileName = GetPDFFileName();

_radMergedContent.ExportSettings.OpenInNewWindow =

true;

 


_radMergedContent.ExportToPdf();



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

Regards,
Kris

4 Answers, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 20 Sep 2010, 02:07 PM
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,
Dobromir
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
0
Joe
Top achievements
Rank 1
answered on 08 Dec 2011, 05:33 PM
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.
0
Rumen
Telerik team
answered on 09 Dec 2011, 05:28 PM
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,
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
0
J2K
Top achievements
Rank 1
answered on 05 Jan 2013, 02:55 PM
Noticed this is in the documentation currently on the Telerik site for ExportContent event:

ExportContent

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.

FileDelete

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.
Tags
Editor
Asked by
Krishna Samaga
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Joe
Top achievements
Rank 1
Rumen
Telerik team
J2K
Top achievements
Rank 1
Share this question
or