Search code examples
infragisticsultrawingrid

UltraGrid Child Bands


I would like to move the child bands of a master band to the very left when exporting to excel using ExcelExporter.

Right now, all the child bands are displaced one column to the right.

Also, each child band has a blank row above and below it. I would like to remove them as well.

is this possible?

Thanks

enter image description here


Solution

  • Private Sub UltraGridExcelExporter1_BeginExport(sender As System.Object, e As Infragistics.Win.UltraWinGrid.ExcelExport.BeginExportEventArgs) Handles UltraGridExcelExporter1.BeginExport
        DirectCast(sender, UltraWinGrid.ExcelExport.UltraGridExcelExporter).BandSpacing = UltraWinGrid.ExcelExport.BandSpacing.None
    
        For Each band As UltraWinGrid.UltraGridBand In e.Layout.Bands
            band.Indentation = 0
        Next
    
    End Sub