Export to Excel / Image option

4 posts, 0 answers
  1. Naren
    Naren avatar
    53 posts
    Member since:
    Aug 2010

    Posted 22 Nov 2010 Link to this post

    Hi,
    I am using RadChart inside Docking control and want Export Chart to Excel and Export to Image functionality.

    I am using RadChart.ExportToImage() /RadChart.ExportToExcelML()  function for this. but this gives only the chart data and did not give chart title shown in RadDocumentPane's Header .

    As shown in attached image i also want to include ChartTitle (Displayed in RadDocumentPane of Docking control) in Export Image/Excel..........

    How can i achieve this......
    Thanks in advance.
  2. Naren
    Naren avatar
    53 posts
    Member since:
    Aug 2010

    Posted 24 Nov 2010 Link to this post

    Hi,
    is there any workaround for this?
  3. Ves
    Admin
    Ves avatar
    2927 posts

    Posted 25 Nov 2010 Link to this post

    Hello Naren,

    You can take advantage of the Telerik.Windows.Media.Imaging.ExportExtensions static class and its ExportToImage and ExportToExcleMLImage methods to export the container of the chart along with the title. Here is an example:

    private MemoryStream GetImage()
    {
        MemoryStream stream = new MemoryStream();
        FrameworkElement element = // your container goes here
       
        Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(
            element, stream, new Telerik.Windows.Media.Imaging.PngBitmapEncoder());
       
        return stream;
    }


    Best regards,
    Ves
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  4. Naren
    Naren avatar
    53 posts
    Member since:
    Aug 2010

    Posted 26 Nov 2010 Link to this post

    Thank you Ves,
    It is right what i was looking for..

    can you answer my one more query in the post with following link
    http://www.telerik.com/community/forums/silverlight/gridview/wrapping-and-autogenerated-numbering.aspx#1434334
Back to Top