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

Exporting dropdown selection into Word Document

1 Answer 53 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Noel
Top achievements
Rank 1
Noel asked on 16 Feb 2017, 06:46 PM

Hi,

I've been trying to get a selected dropdown option to appear in a Word Document on export.
The current default behavior is that all option tags appear in the exported document with no indication of which was selected. (This makes sense that this behavior would occur since the export function is simply exporting all the html as plain text).

So far, these are the approaches I've tried (none of which work):
-Capture the export event before it is sent to the controller via the javascript execute event (thus being able to strip out any unwanted text). The issue is the execute event and exportas event are asynchronous, so I can't modify the file before the export event call is executed.

-Modify the text on the controller side before it is converted to a Word document and downloaded (the text is sent through without special characters, which makes it nearly impossible to parse)

-Attempt to replace the dropdown with a kendo autocomplete widget (this would also be an acceptable solution). The widget does not render properly inside the document. All of the datasource options are there and even filters corretly, but it does not style correctly or open.

 

Has anyone else been able to find a solution to this problem or have another approach I could use?

-Noel

 

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 20 Feb 2017, 12:17 PM

Hello Noel,

If you are using the client-side Kendo UI Editor, there is no built-in support to export to Word documents. Therefore, I assume, you are using some sort of server-side engine to export the HTML to Word document. In such a case, it is a matter of the exporting engine that processes the content to handle elements like input, select, and so on.

If, however, you are using the MVC wrapper of the Kendo Editor with its built-in export capabilities, I do not see the RadWordsProcessing to support select elements (http://docs.telerik.com/devtools/document-processing/libraries/radwordsprocessing/formats-and-conversion/html/supported-elements). That said, I am unable to suggest you a solution to somehow export a select element to include it in a Word document.

As for using a Kendo widget in a Word document.This is not possible. Kendo UI depends on HTML and JavaScript. MS Word and any rich text editor not work with HTML, but different format and specifications. Thus, it is impossible to put a Kendo widget in a word document.

Regards,
Ianko
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Editor
Asked by
Noel
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or