PivotGrid Export does not include DataTemplate

2 posts, 0 answers
  1. ahps
    ahps avatar
    4 posts
    Member since:
    Sep 2014

    Posted 25 Jul 2017 Link to this post


    We are exporting a pivotGrid 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 doesnt show this image, or anything else in the DataTemplate.  Even if we add a simple textBlock 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 textblock should be.

    Are we missing something simple?

    Many thanks,



  2. Polya
    Polya avatar
    254 posts

    Posted 28 Jul 2017 Link to this post


    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

    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.
Back to Top