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
4165
How to Export only Band[0] in multiband Grid?
posted

Hello, 

I am using an UltraGridExcelExporter component with a grid that has two bands.

How can I only export the parent band?  (band[0])

Many Thanks,

  • 18204
    Verified Answer
    Offline posted

    Hello M,

    Thank you for posting in our forums!

    You can achieve this by handling the ExportStarted event of the UltraGridExcelExporter and setting the Layout.ViewStyle to SingleBand.

    Alternatively, you can also hide the first child band.  Please see examples of this in the code snippet below.

    private void ultraGridExcelExporter1_ExportStarted(object sender, Infragistics.Win.UltraWinGrid.ExcelExport.ExportStartedEventArgs e)
    {
        e.Layout.ViewStyle = Infragistics.Win.UltraWinGrid.ViewStyle.SingleBand;
        // or
        //e.Layout.Bands[1].Hidden = true;
    }

    If you need further assistance with this, please let me know and I will be glad to help.