I am attempting to export a radTreeView to a PDF using TreeViewSpreadExport
The documentation mentions an iSpreadExportRenderer interface, but doesn't give any information how to use it.
Could you provide an example of how to use TreeViewSpreadExport for a PDF (and perhaps an XLS also) ?
5 Answers, 1 is accepted
Thank you for contacting us.
RadTreeView can be exported to , , pdf and txt formats using TreeViewSpreadExport. You can refer to the code snippet below how to export it:
The same code snippet is added in our documentation for TreeViewSpreadExport (please see attached screenshot). The article is divided into several sections demonstrating how to use the export provider and how to customize the exported data using properties and events.
We have added an example in our Demo Application demonstrating exporting this feature too. The location where you can find it is: START >> All Programs >> Telerik >> Telerik UI for WinForms [version] >> Examples >> C# for Visual Studio 2010 >> Open C# Demo Application in Visual Studio - RadControls for WinForms.The example is under TreeView >> Exporting with Document Processing Libraries.
I hope that you find this information useful. Should you have any other questions, do not hesitate to contact us.
I am using Telerik.WinControls version 2015.3.1104.40.
When I use your code snippet, I get "The type or namespace name 'SpreadExportRenderer' could not be found (are you missing a using directive or an assembly reference?)".
Since I am successfully using the TreeViewSpreadExport object, I am definitely not missing anything.
I figured out why it isn't working.
Nowhere in the documentation does it mention that a reference to "TelerikExport" needs to be added.
Thank you for writing back.
In our there is information which assemblies you need to include in the application so you can export RadTreeView. You can refer to our latest documentation here: TreeView >> Export to Data >> SpreadExport.
In the attachments, you can find a short video demonstrating how to see the code snippets which are used in the examples in the Demo Application.
If you are not using the online documentation, could you make sure that you download the latest version of the offline files you use. You can refer to the following article how to Download Product Files.
Let me know if I can assist you further.