Hello,
we are using the Ultra win grid to show some values and such, like for instance the balance of a bank account. And when we export it theres always a grandtotal appearing at the bottom of the excel sheet with the totals of *all* columns. How can we disable that?
So I guess my original reply was a bit ambiguous. What I wrote was "if you are seeing summaries in the export that are not displayed in the grid."If your on-screen grid has summaries, then they will be exported to Excel by default. Also, this post is 3 years old, so I'm not sure why you are making this point now. :)Do you have a question about this?
I disagree about the excel exporter not adding summary rows automatically. I have a very simple program, just added the excel exporter component to the main windows form and have a very export process of the following. Sure enough, at the bottom of the excel file there is a summary row showing the count of rows, "Count = 59".
I have done nothing to the excel exporter except for what is shown below as I just added this code to my program, so why is there a summary row in the very first excel export of this data?
private void ubtnExportGrid_Click(object sender, EventArgs e) { ugEE.Export(ugMonthlyPeriods, _currentSite.SiteName + ".xlsx"); } private void ugEE_CellExporting(object sender, Infragistics.Win.UltraWinGrid.ExcelExport.CellExportingEventArgs e) { if (e?.GridValue != null) { var cellType = e.GridValue.GetType().FullName; if (cellType == "System.Double") { var cellContents = e.GridValue.ToDoubleSafe(0); e.ExportValue= $"{cellContents:F2}"; } } }
Okay... I think you just need to get rid of SummaryDisplayAreas.GroupByRowsFooter.
//GridControl.DisplayLayout.Override.SummaryDisplayArea = SummaryDisplayAreas.Bottom | SummaryDisplayAreas.GroupByRowsFooter;GridControl.DisplayLayout.Override.SummaryDisplayArea = SummaryDisplayAreas.Bottom;
So no automated linebreaks huh....
Well, the thing is i have no clue about any of this, much less the code behind it. I was practically thrown into this project, but anyways. I noticed these lines in the Initialize method of the grid
GridControl.DisplayLayout.Override.SummaryDisplayArea = SummaryDisplayAreas.Bottom | SummaryDisplayAreas.GroupByRowsFooter; GridControl.DisplayLayout.Override.GroupBySummaryDisplayStyle = GroupBySummaryDisplayStyle.SummaryCells; var summaryFooterCaptionVisible = DefaultableBoolean.False; if(ShowSummaryFooterCaption) summaryFooterCaptionVisible = DefaultableBoolean.True; GridControl.DisplayLayout.Override.SummaryFooterCaptionVisible = summaryFooterCaptionVisible;GridControl is of type UltraGrid.So far what i figured out is that all the "datasets" are in a "band". And the grid only has one band. It shows a summary for all values per dataset, which is correct, but then it shows a grand summary of all summaries of all datasets at the very bottom, which isnt wanted.The only things ive managed so far is to not show ANY summaries whatsoever or hide the band, and thus everything. I literally get a blank page then