When a grid is grouped by some column and exported to excel using UltraGridExcelExporter, how to show headers only once and also how to exclude empty rows?
Thanks,Rajesh.
Hi Rajesh,
rajesh_m said:how to show headers only once
I'm not sure there's any way to do this. The exporter currently does not honor the HeaderPlacement property in the grid. This is a feature we may add in the future, but right now, I'm not sure it's possible. Maybe you could achieve this by handling events of the UltraGridExcelExporting and cancelling some of the headers, but how it would be pretty tricky.
rajesh_m said:also how to exclude empty rows?
I'm not sure what this means. What empty rows are you referring to?
I am using the below property for the summary display area
gridToFormat.Grid.DisplayLayout.Override.SummaryDisplayArea = SummaryDisplayAreas.TopFixed
Or SummaryDisplayAreas.GroupByRowsFooter Or SummaryDisplayAreas.InGroupByRows
So, when I export the grid to excel which is grouped by some x column, I see an empty row after each header.
Thanks,Rajesh
I do not have any other settings on the grid, It is may be because of the older version.
Hi Rajash,
I didn't get that extra space when I tested this. So maybe this is a bug in the version of the controls that you are using. You should try getting the latest service release and see if that helps.
How to get the latest service release - Infragistics Community
If that does not help, then there must be some other setting you are using that I am not, or else something in your code that is doing this.
Attached is excel exported from the grid.
I do not know why Rows #5, #10, #12.. appear as empty rows.
I'm still not sure what empty rows you are referring to. I tested this out using the SummaryDisplayArea settings you listed here with a grouped grid and I don't see any empty rows in Excel when I export the grid, except for the rows in between the bands.
Maybe you could post a screen shot or an Excel file that shows what you mean.