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
1075
Incorrect export of multiband grid
posted

Hi,

I discovered an export to Excel is failing in a specific case when using a multiband grid. It's too specific to explain, but my attached sample project demonstrates the problem.

If you run my program and export the grid data to Excel, the rows containing 'Item 1.1.2' and below are placed two cells too far to the right (they should start in column A).

I know the layout is doing unusual things like adding dummy columns in the first band and hiding the column headers of the other bands, but this creates the visual result the product owner requires.

UltraGridMultiBandExportToExcelProblem.zip
Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi,

    I ran your sample and I see what you are describing. But the behavior you seem to expect is not correct.

    The child rows are supposed to be intended.

    There appears to be a bug here, but the bug is that the "Category 1.1" and "Item 1.1.1" are NOT being indented properly. This seems to be caused by the hiding of the column headers for those bands.

    Now for the good news. This bug was fixed a long time ago. I tested your sample with v11.2 and it works fine.

    But, that's probably small consolation, since the intended behavior is apparently not what you want, anyway. So, if you want to flatten the list so every row exports to the "A" column in Excel, you could achieve that in a couple of ways. Here's the workaround I'd use:


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

Children