Hi,
I have 2 bands in my layout, but I just want to export the data in the main band without any outline levels and the '+' expansion indicator.
Is there any way I can achieve this? Thank you
Regards,
Jason
You can use UltraGrid.DisplayLayout.MaxBandDepth
Hi Jason,
MaxBandDepth might work, but you obviously don't want to set it on the grid, because that will affect the grid on the screen.
What you should do is handle the BeginExport event of the UltraGridExcelExporter and use the e.Layout passed in to the event. This is a clone of the grid's DisplayLayout, so you can modify it without affecting the on-screen grid.
You could set the ViewStyleBand to Single, or maybe set MaxBandDepth to 1, or just set the e.Layout.Bands[1].Hidden to true. Any of those should acheive what you want.
Thank you guys. The MaxBandDepth = 1 doesn't work for some reason. I am using Hidden = true. Problem solved.
Mike Saltzman"]MaxBandDepth might work, but you obviously don't want to set it on the grid, because that will affect the grid on the screen. What you should do is handle the BeginExport event of the UltraGridExcelExporter and use the e.Layout passed in to the event. This is a clone of the grid's DisplayLayout, so you can modify it without affecting the on-screen grid.
I thought it goes without saying :)