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
335
Show column headers once at the top when exporting a grouped single-banded grid
posted

My scenario: I have a single-banded grid.  When no columns are grouped, the column headers appear at thetop of the grid.  But when I group by one of the columns, the column headers are removed from the top of the grid, and do appear at the top of each group when that group is expanded.

If I apply the following:

UltraGrid1.DisplayLayout.ViewStyle = Infragistics.Win.UltraWinGrid.ViewStyle.SingleBand

the column headers appear only once (at the top of the grid) and do not appear when I expand each group.  This is fabulous, especially when I have numeric columns which are summed - when grouping, my user can see summarized totals, and can expand to see detail.

However, when exporting the grid to excel, the UltraGridExcelExporter does not appear to perform equivalently, which means that my users are forced to expand a group to see the column headings, and the column headings are then repeated continuously throughout the excel document.

Is there a way to get the UltraGridExcelExporter to perform the equivalent function that the grid performs when setting the ViewStyle property to SingleBand - ie to show the column headings only once, and at the top of the excel document?

Attached is a sample project that loads a simple grid with data, creates a summary, and toggles the ViewStyle property, so that you can see that the UltraGridExporter produces the same result regardless of the ViewStyle property setting.  Beware that this project will write a file C:\Test.xls if you export. There is a sample.xls file that depicts what I am asking for here.

Thanks,

Walter

GridExport.zip
Parents
No Data
Reply
  • 469350
    Offline posted

    Hi Walter,

    The ViewStyle basically just resolves the HeaderPlacement property, and the HeaderPlacement is currently not honored by the UltraGridExcelExporter. This is a known bug.

Children