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
815
MaxBandDepth Changing After Datasource Set
posted

Why does the MaxBandDepth change after the Datasource is set?  According to the documentation "MaxBandDepth....Gets or sets the max band depth. Grid will load up to MaxBandDepth number of bands. Note that you have to set the MaxBandDepth before binding the UltraGrid."

I am asking the question because I recently started using the UltraGridPrintDocument for a grid that is bound to objects that have normally have 2 bands.  I set the MaxBandDepth to 1 just before I bind the grid and that works great.  Right after I band the grid, the MaxBandDepth gets set to 100 automatically.  This results in the UltraGridPrintDocument attempting to render the normally hidden bands and + signs appear on the print preview and first column is stretched to accommodation the child bands.

I was able to side step this by simply resetting the MaxBandDepth again right after set the Datasource of the grid, however the behavior was unexpected.