Hi Mike,
I found an issue in exporting wingrid to excel.
In the summary row in the exported excel file, there are warnings in each summary cell asking me whether to convert the summary value to number type.
Please refer to the attachment for details.
How can I avoid this warning?
Thank you~
Summaries can include text. You must be setting the DisplayFormat on your summaries to remove the text and just show the numeric values, but the grid can't interpret the format, so it still exports as text.
What you would have to do is use the SummaryCellExported event of the UltraGridExcelExporter and write a numeric value into the WorksheetCell, instead of the string.
Something like this:
private void ultraGridExcelExporter1_SummaryCellExported(object sender, Infragistics.Win.UltraWinGrid.ExcelExport.SummaryCellExportedEventArgs e) { if (e.Summary != null) e.CurrentWorksheet.Rows[e.CurrentRowIndex].Cells[e.CurrentColumnIndex].Value = e.Summary.Value; }