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
540
Empty Excel Export in Web Hierarchical Data Grid
posted

Good Day,

 

I am attempting to export the Web Hierarchical Data Grid to excel using the Web Excel Exporter control.  My controls are currently sitting inside of an UpdatePanel control.  I have set that to Conditional and set the "Export to Excel" button as a postback trigger.  All is working well and it saves correctly.  However, upon opening the file, all of the cells are empty in the excel worksheet.

This is my click event code (server side) for the excel export button, also, my grid is loaded dynamically from an ienumerable object:

protected void btnSchedule_ExportExcel_Click(object sender, EventArgs e)

        {

            LoadScheduleGrid();

            this.weeSchedule.DownloadName = string.Format("HPDSchedule_{0}", DateTime.Now.ToString("MM-dd-yy(HHmm)"));

            this.weeSchedule.ExportMode = ExportMode.Download;

            this.weeSchedule.WorkbookFormat = Infragistics.Documents.Excel.WorkbookFormat.Excel97To2003;

            this.weeSchedule.Export(this.whdgSchedule);

        }