|123768||Apr 19,2016 01:48 PM UTC||Apr 20,2016 06:31 AM UTC||ASP.NET Web Forms||1|
Thanks for contacting Syncfusion support.
We have checked the reported issue by using the provided code snippets, but we were unable to reproduce the reported issue. So could you please try the attached sample and share following information.
1. In provided code snippet, the Grid was rendered inside the content template. So we suspect that you are rendering Grid inside update panel. If you’re rendering Grid inside update panel and perform the export operation please ensure the following knowledge base document and code example.
<asp:UpdatePanel runat="server" ID="UpdatePanel1">
<ej:Grid ID="FlatGrid" runat="server" AllowSorting="True" OnServerExcelExporting="FlatGrid_ServerExcelExporting" AllowPaging="True">
. . .
<asp:PostBackTrigger ControlID="FlatGrid" />
2. Ensure the dataSource is specified in the server exporting method, because while binding the remote data we need to specify the dataSource.
ExcelExport exp = new ExcelExport();
FlatGrid.DataSource = new NorthwndDataContext().Orders.Take(50).ToList();
exp.Export(FlatGrid.Model, (IEnumerable)FlatGrid.DataSource, "Export.xlsx", ExcelVersion.Excel2010, true, true, "flat-lime");
3. Essential studio and browser version details.
4. Scenario to reproduce the issue and full code snippets of Grid default.aspx and code behind page.
5. Share sample if possible or modify the attached sample as issue reproducible.
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.