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.
Hello,
When are you doing this? Is it in design-time or run-time? 'MaxBandDepth' should be set in design-time, one time only. If this is not working, could you please try to attach, if possible, a small sample project, reproducing the above mentioned issue, I will be happy to take a look at it?
If the property is spontaneously changing when the you set the DataSource on the grid, then that's a bug. But I've never seen that happen before.
Is it possible that your code is resetting the property without realizing it? Maybe you are loading a Layout or a Preset into the grid that is setting this property?