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

PivotGrid Export does not include DataTemplate

1 Answer 71 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
ahps
Top achievements
Rank 1
ahps asked on 25 Jul 2017, 11:31 PM

Hi,

We are exporting a to a number of formats depending on what the user selects (using PdfFormatProvider, HtmlFormatProvider etc), and we use a CellTemplateSelector to add a simple image to some columns to indicate an increase or decrease in the value.

When the grid is exported the result show this or anything else in the DataTemplate.  Even if we add a simple  into the DataTemplate it is still missing from the exported report in any format. The rest of the data is displayed in the exported report normally.

I can understand maybe a binary image not being displayed,  but surely the should be.

Are we missing something simple?

Many thanks,

 

 

1 Answer, 1 is accepted

Sort by
0
Polya
Telerik team
answered on 28 Jul 2017, 02:46 PM
Hello,

The RadPivotGrid export functionality provides a PivotExportModel that contains PivotExportCellInfos which contain information about the position, alignment and styling of a pivot cell, which properties will be translated onto the Telerik.Windows.Documents.Spreadsheet.Model.CellSelection and a workbook will be populated.

The DataTemplate for a pivot cell can be modified and thus the presentation of the data inside the cell can be anything - it can contain pictures, additional text, various formatting, UI elements, etc. This information however cannot be extracted and translated to the CellSelection as the CellSelection's export works with text. As text we're using the data that the RadPivotGrid works with - which is the aggregated and summarized results of calculations over the source.

That said, I can only suggest, if you wish to export additional images for particular cells, you can extract the image based on the CellInfo's Column and Row properties and place it in the generated export using FloatingImages: http://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/features/shapes-and-images

Regards,
Polya
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
PivotGrid
Asked by
ahps
Top achievements
Rank 1
Answers by
Polya
Telerik team
Share this question
or