Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
25
WebExcelExporter does not respond on Export, (WebDataGrid bound with DataTable)
posted

Hello,

Problem:

When I click on my "Export Data" button, no dialog window appears allowing me to save or open an excel file.

Description:

I am trying to implement the WebExcelExporter control in an ASP.NET application to download the data contained in my WebDataGrid as an excel spreadsheet.  The data that I am binding to the WebDataGrid, is coming from queries I am completing against a proprietary data base (not SQL or any other compatible DataSource type).  I retrieve the data from my queries as a DataTable and then bind it to the WebDataGrid.  I have a WebExcelExporter on the page as well as a button that when being clicked triggers the method call to export the DataGrid in an excel sheet.  I have set a break point to verify that this code is being triggered.

ASP code:

<ig:WebExcelExporter ID="StationExcelExporter" runat="server" DownloadName="Exported Stations"></ig:WebExcelExporter>
<asp:Button ID="btnExport" runat="server" Text="Export Station Data" onclick="btnExport_Click" UseSubmitBehavior="False" />

C# Button Event Code:

protected void btnExport_Click(object sender, EventArgs e)
{
     StationExcelExporter.Export(StationDataGrid); // OR this.StationExcelExporter.Export(this.StationDataGrid) (Neither work)

}

References:

  • Infragistics4.Web.v13.1
  • Infragistics4.WebUI.Documents.Excel.v13.1
  • Infragistics4.WebUI.Documents.IO.v13.1
  • Infragistics4.WebUI.WebResizingExtender.v13.1

I set a breakpoint on the line of code that executes the Export method call, and when I look into the DataSource of the StationDataGrid (WebDataGrid control), I can see all of the data binded to the DataGrid.  Any help with this would be appreciated because I'm not sure what else I can debug.

I have code identical to this is another application and it works.

I followed this tutorial exactly and it didn't work for me, so I continued to make various changes to it to suit my needs.

Thanks,

M

Parents Reply Children
No Data