Grid Export to Excel

8 posts, 0 answers
  1. Philip Senechal
    Philip Senechal avatar
    152 posts
    Member since:
    Apr 2008

    Posted 20 Aug 2010 Link to this post

    I'm setting up code to export my grids to Excel using the new ExcelML methods. I'm having a problem using the code in this demo:

    http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/excelmlexport/defaultcs.aspx

    PageSetupElement is coming back as an unknown type or namespace.

    I have the following declarations in my code behind:
    using Telerik.Web.UI;
    using Telerik.Web.UI.GridExcelBuilder;

    Is there another one I have to add to gain access to this type?
  2. Daniel
    Admin
    Daniel avatar
    4949 posts

    Posted 23 Aug 2010 Link to this post

    Hello Philip,

    Can you please post your code here? Also I would appreciate if you let me know which version of RadControls do you use?

    In the meantime you could test the sample project that is attached to this forum post.

    Best regards,
    Daniel
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Philip Senechal
    Philip Senechal avatar
    152 posts
    Member since:
    Apr 2008

    Posted 26 Aug 2010 Link to this post

    Sorry it took so long for me to respond...I just had knee surgery and have been out for a bit.

    I'm actually doing this from Sitefinity using the RadGrid control included with version 3.7 of Sitefinity, so I believe the RadControl version is 2010.1.309.35. I'm assuming that's probably my issue and that this functionality wasn't built into the older version of RadControls that comes with Sitefinity 3.7.

    Is there anything I can do about this? Can I upgrade the version of Telerik.Web.UI in Sitefinity 3.7 or am I risking causing problems with the way Sitefinity works?

    Thanks!
  4. Daniel
    Admin
    Daniel avatar
    4949 posts

    Posted 01 Sep 2010 Link to this post

    Hello Philip,

    The important thing here is that all Sitefinity dlls are build against certain version of Telerik.Web.UI.dll. Sitefinity 3.7 SP3 includes Q1 2010 (2010.1.309) of RadControls for ASP.NET AJAX. Generally it is better to use the regular SP (SP4 will be released within a month) of Sitefinity which include the official releases of RadControls for ASP.NET AJAX. Otherwise there is no guarantee that each control and each property will work properly.  
    In case you change the dlls and you have custom controls you have to rebuild them with the correct version of Telerik.Web.UI. This article at MSDN explains how to do this.
    If you wish to use a newer version of the controls you would have to perform a <bindingRedirect> from the version which we have built and distribute Sitefinity with to the one you intend on using. More information on this can be found in this article.

    Regards,
    Daniel
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Sanjeev
    Sanjeev avatar
    4 posts
    Member since:
    Nov 2010

    Posted 04 Nov 2010 Link to this post

    Daniel,

    I am using Telerik.Web.UI dll with version 2009.2.826.20 and using Telerik RadGrid control but I am not able to see the ShowExportToExcelButton attribute in CommandItemSettings tag.

    Please suggest what to do ASAP.
  6. Daniel
    Admin
    Daniel avatar
    4949 posts

    Posted 04 Nov 2010 Link to this post

    Hello Sanjeev,

    Built-in export buttons are available in RadControls for ASP.NET AJAX versions Q3 2009 (2009.3.1103) and later.
    You should create your own export buttons if you use an older version.

    Best regards,
    Daniel
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Amruta
    Amruta avatar
    1 posts
    Member since:
    Apr 2012

    Posted 23 Apr 2012 Link to this post

    Hi Daniel,

    I am using telerik.web.ui dll with version as 2009.2.826.20.
    I use export to excel feature of radgrid and it works fine with IE8. But with IE9 data is not exported. What can be the cause of this and how can I get the data exported to excel in any browser?

    Your help is highly appreciated.



  8. Daniel
    Admin
    Daniel avatar
    4949 posts

    Posted 26 Apr 2012 Link to this post

    Hello Amruta,

    I'd recommend that you try toggling the OpenInNewWindow property. Also, when you get the Open/Save bar at the bottom of the browser I suggest that you choose Save -> Save and Open.

    Regards,
    Daniel
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top