Hi,
I am having this extra space in UltraWinGrid (snapshot attached). How can I remove it?
Regards,
Nitin Jain
Hello Nitin,
If I have to guess, I would say that you have some child records, with a lot more columns than in the parent band. If you expand on of your parent records, the above could happen.
Please feel free to let me know if I misunderstood you or if you have any other questions.
Hi Boris,
Sorry for not to be very clear in screenshot. There may be some child bands, but for this grid we are not showing them.
PS: In our application, this is the derived class for the grid. So, that is why there may or may not be child bands in base class, but in this class we are not showing any of the child bands.
So, even if there are any child bands, they are being hidden always.
Please let me know if the hidden child bands impacting this. If yes, then what could I do to come up from this issue.
Also, if there are any child bands, then by default these are being collapsed.
I tried to change the ViewStyle to Single Band, and it worked. So, it seems that this is being caused by Multiple bands present even the bands are not being shown.
Is it possible to achieve this with Multiple/Child Bands?
Hi Nitin,
How many child bands do you have?
The grid has to be able to scroll over to the right far enough to accommodate all of the child bands - regardless of whether they are expanded or not.
The large space you have here leads my to guess that your data source might be recursive, and thus have an infinite depth. If that's the case, then the grid will limit the band depth to 100 by default, but you could reduce this limit and make things more manageable. No human user could possibly deal with 100 levels of data, anyway, and the BindingManager in DotNet will start to suffer some serious performance problems after about level 5 to 8.
So try setting the MaxBandDepth property on the grid to somewhere between 5 and 8 and see if that helps.
Hi Mike,
Sorry for so late reply. I just tried your suggestion but that also didn't work.
I set the MaxBandDepth to 3, but still can see the unnecessary space at the end.
I am setting it in GridInitializeLayout event handler, do I need to set it at any other place?
Thanks,
InitializeLayout is too late. You should set this property on the grid at design-time.
I tried setting it at design time to 3, but still it is not working.
Is there any other property by which this can be suppressed/overrided?
Yes, that was a typo. I can still see the extra space.
I am very sorry that I cannot provide client code as it is on client machine. Also, if I would be able to replicate the same in sample project then I could solve the issue probably :)
I will rethink on all the options I can get from the earlier posts like "setting MaxBandDepth is occurring too late or too early" and get back to you if find the issue.
Nitin Jain said:Still I can't see the extra space after the last column.
Is that a typo? You mean you can still see the extra space, right?
I'm afraid I don't know what's happening here, then. The only other thing I can think of is that the setting the MaxBandDepth is occurring too late or too early and so it's not taking effect.
Is there any way you could post a small sample project demonstrating the issue? I'm sure if I can reproduce the issue here I could figure out why it's not working.
I checked with the option you suggested and found that the MaxBandDepth property is 3 and not being overridden at any place. Still I can't see the extra space after the last column.
Thanks Mike for the good suggestion.
Can you please also suggest all the properties that I should look for this issue?
As a test, try putting a button on the form and in the click event of the button, check the property settings to make sure they are still set to what you set them to. If not, then something is overwriting them. If so, then you know the problem is something else.