Why would scrollbars on a grid not show? I have specifically set them to show in DisplayLayout of the grid. I have tried setting the Scrollbars property to automatic, Veritical and they never show. Any ideas?
Thanks
Scott
Hello Scott,
UltraGrid’s property Scrollbars determine when and how scrollbars should be displayed. The control would enable and disable the scrollbars depends on rows’ and columns’ counts. So if you set ultraGrid1.DisplayLayout.Scrollbars to Scrollbars.Vertical it will display a vertical scrollbar and it will be enabled or disabled depends on rows’ count. If you set this property to Automatic, then the grid will display scrollbars only if they are needed.
Let me know if you have any further questions or If I misunderstood your requirement.
That is the property I am setting but i still don't see scrollbars. I have tried both setting to Automatic and Vertical
ugMyDeltekProducts.DisplayLayout.Scrollbars = UltraWinGrid.Scrollbars.Automatic
I am attaching the screen i see and the grid with the black box around it should have scroll bars.
I have two guesses:
1) Something in your code is setting or resetting this property after you are setting it. So when are you setting it? Are you setting it again somewhere else in your code? Are you loading a Layout or Preset into the grid which might be overriding this setting? Have you tried checking the actual property value at run-time to see if it is still set to what Automatic?
2) Based on your screen shot, it looks like the grid is inside some kind of container - maybe a panel or something. It's possible that the grid's size is larger than the container and therefore the scrollbar is there, but it's just clipped by other controls.