This is a migrated thread and some comments may be shown as answers.
RadGrid Export Content-Type Is Wrong
3 Answers 7 Views
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 21 Mar 2014, 05:57 PM
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.

3 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 26 Mar 2014, 01:20 PM
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.


Regards,
Konstantin Dikov
Telerik
 

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.

 
0
David
Top achievements
Rank 1
answered on 27 Mar 2014, 02:59 PM
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.
0
Christopher
Top achievements
Rank 1
answered on 11 Jul 2016, 09:05 PM
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?
Tags
Grid
Asked by
David
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
David
Top achievements
Rank 1
Christopher
Top achievements
Rank 1
Share this question
or