Export a RadLinearSparkLine embed in a GridViewDataControl to Excel

2 posts, 0 answers
  1. Javier
    Javier avatar
    1 posts
    Member since:
    Oct 2017

    Posted 03 Oct Link to this post

    Hi

    I have a RadTreeListView with a custom column that is a RadLinearSparkLine, as follow

    <telerik:RadTreeListView .......>
       <telerik:GridViewDataColumn DataMemberBinding={Binding field1}....>
       <telerik:GridViewDataColumn DataMemberBinding={Binding field2} ....>   
       <telerik:GridViewDataColumn DataMemberBinding={Binding field3} ....>
          <telerik:GridViewDataColumn.CellTemplate>
             <Datatemplate>
                <telerik:RadLinearSparkLine ItemsSource={Binding DiccionaryWithTheValues} ....... />
             </Datatemplate>
    .....
    .....

    This works fine. It shows a grid with data and a graphic column based in the values from the "DiccionaryWithValues"

    This grid needs to be exported to Excel. We use the Export method of the object RadTreeListView, but it doesn´t export correctly the RadLinear column. Instead of the chart, it exports a text wich represent a data type.

    It is posible to export the chart with the Export method in anyway?????

    Thanks

  2. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    603 posts

    Posted 06 Oct Link to this post

    Hello Javier,

    In order to be able to export the chart, you need to define a custom column and override the GetCellContent method as explained in this article.

    I hope you find this helpful.

    Regards,
    Dilyan Traykov
    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