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
205
How Do I get UltraWebGridExcelExporter - To Export my Grid Footers
posted

I am using the UltraWebGridExcelExporter control to export my grids but the Nice footers I have designed do not come out in the excel spread sheet. Can someon tell me why?

 Thanks

Larry

www.AboutMeadows.com

www.CJSShades.com

Parents
No Data
Reply
  • 2677
    posted

    Hello,

    When you say "the Nice footers I have designed", does that mean that you are creating ColumnFooter objects and adding them to the FooterLayout of the grid.  If that is the case, then that would not be supported and would directly relate to the Note at the beginning of the following article which demonstrates how to create your own ColumnHeader objects and add them to the HeaderLayout.   

    ColumnHeader/ColumnFooter

    In order to get something like this to work, you will have to create the row yourself in the exporting events.  Here is a quick snippet of what has to be done.  it uses the SummaryRowExported event and adds a new row to the worksheet.  Then, all that you would have to do is place the appropriate footer values in it. 

    protected void UltraWebGridExcelExporter1_SummaryRowExported(object sender, Infragistics.WebUI.UltraWebGrid.ExcelExport.SummaryRowExportedEventArgs e)

    {

    foreach (WorksheetCell cell in e.CurrentWorksheet.Rows[e.CurrentRowIndex].Cells)

    {

    e.CurrentWorksheet.Rows[cell.RowIndex + 1].Cells[cell.ColumnIndex].CellFormat.FillPattern =
    FillPatternStyle.Solid;

    e.CurrentWorksheet.Rows[cell.RowIndex + 1].Cells[cell.ColumnIndex].CellFormat.FillPatternForegroundColor = this.UltraWebGrid1.DisplayLayout.FooterStyleDefault.BackColor;

    e.CurrentWorksheet.Rows[cell.RowIndex + 1].Cells[cell.ColumnIndex].Value = "FooterValue";

    }

    }

     I hope this helps.

Children
No Data