RadGrid Export Content-Type Is Wrong

4 posts, 0 answers
  1. David
    David avatar
    3 posts
    Member since:
    Mar 2014

    Posted 21 Mar 2014 Link to this post

    I use the Export feature in RadGrids on many pages to export Excel, MSWord and PDF documents.  It works on all but one page.  The culprit throws the PageRequestManagerParserErrorException when Visual Studio is in Debug mode.  Furthermore, if I try to export an Excel document, Fiddler shows that the response header’s Content-Type is “text/plain;  charset=utf-8” instead of “application/vnd.ms-excel;”, and the WebView and Raw view is gobble-de-gook.  Please help.

  2. Konstantin Dikov
    Konstantin Dikov avatar
    2466 posts

    Posted 26 Mar 2014 Link to this post

    Hello David,

    It seems that on the page that you are experiencing that problem, the grid is AJAX enabled, which is not supported scenario with the exporting functionality. However, you could have a look at the following help article, which explains in details how to export from AJAX enabled RadGrid:
    Hope that helps.

    Konstantin Dikov

    Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

  3. David
    David avatar
    3 posts
    Member since:
    Mar 2014

    Posted 27 Mar 2014 in reply to Konstantin Dikov Link to this post

    Yes.  Thank you.  Actually, I found an unnecessary AjaxSetting in my RadAjaxManager.  I added it while degugging something else.  It was tied to the user control that contains the export button.  When the setting was removed, the exports began to work again.
  4. Christopher
    Christopher avatar
    2 posts
    Member since:
    Jul 2016

    Posted 11 Jul 2016 Link to this post

    This is a bit of an old topic, but I'm having a similar issue where the RadGrid ExportToExcel() method is generating output that includes a header item "<meta http-equiv="Content-Type" content="text/html; charset=utf-8">" in addition to the the header also showing a content-Type of "application/vnd.ms-excel.  Our security scanning software is returning an error saying Multiple conten types are specified.  Is there a way to get rid of the <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> definition?
Back to Top