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
785
Exporting a Grid that is grouped
posted

I have to believe this is a common request, but it is driving me crazy...

I have a grid, it is grouped by a column.  When I export the grid to excel it puts the group by value in Column A and sets it width to the columns width.  It then starts on the next row with the data rows.   So when you look at the grid in excel you have a big column A and then your data is in column B and not under the group by column.  Looks weird and I don't want my users to have to resize Column A everytime they open the spread sheet.

Ideally, I would like to merge the Cells in the group by row (just like it does it on the grid), in the Excel file.   Failing that, at least set the width of column A to something small (like the indention width, and let Excel  display over muliple cells if it has to.

Like I said, I'm sure I'm missing something because it does way to good of a job formating everything to not have consider what must be a pretty common occurance.... 

 

 

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi,

        If you want to stop the child rows from shifting over into column B, try this:

    private void ultraGridExcelExporter1_BeginExport(object sender, Infragistics.Win.UltraWinGrid.ExcelExport.BeginExportEventArgs e)
            {
                foreach (UltraGridBand band in e.Layout.Bands)
                {
                    band.Indentation = 0;
                }
            }

         

Children