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
165
UltraWebGridExcelExporter Not Showing Save Dialog
posted

What I'm doing here is using code to determine if there are 300 rows in my dataset.  If there are, then I want to create the new WebGrid object and use that for the Excel export.  If there are not 300, then I use the grid that is visible on the page.  I'm doing this for performance reasons because the users can have grids with hundres, and thousands of rows which take quite a while to render on the page.  When there are 300 rows, the save dialog box never comes up.  Please help!

<igtblexp:UltraWebGridExcelExporter ID="gridExport" runat="server" DownloadName="Results.XLS">
</igtblexp:UltraWebGridExcelExporter>

protected void SaveExcel(UltraWebGrid grid)
{
    
UltraWebGrid ug = new UltraWebGrid();
    
if (Session["reportGrid"] != null)
     {
         
if (((DataSet)Session["reportGrid"]).Tables[0].Rows.Count > 300)
          {
               ug.DataSource = (
DataSet)Session["reportGrid"];
               ug.DataBind();
               gridExport.Export(ug);
          }
     }
    
else
    
{
          gridExport.Export(grid);
     }
}

Parents Reply Children
No Data