Is it possible to deactivate SplitterBar in WinGrid by setting any property? In some cases after setting up some properties and rebuild solution the splitter bar are added automatically to my UltraWinGrid (i manually define a schema at runtime: generic list of wrappr class). I hadn't found any property like HideSplitterbar.
Any ideas?
Thanks!
If you mean the ColumnScrollRegion and RowScrollRegion splitters I am not sure you can hide them but you can set MaxColScrollRegions and MaxRowScrollRegions to 1 which will limit the number of scroll regions.
I have a grid on which MaxColScrollRegions and MaxRowScrollRegions are both set to 1 (via the grid designer when I unchecked a couple of checkboxes). However, at runtime I still get an extra unwanted ColScrollRegion. In the InitializeLayout event, the extra scroll region is already there. Upon further inspection, the designer-generated code is indeed creating two scroll regions.
How do I indicate in the designer (which already shows MaxColScrollRegions == 1) that I do not want the extra scroll region?
Thanks
In the UltraWinGrid Designer, under 'Basic Settings', choose 'feature picker'. you will get a tree where you could choose and set properties on the grid. In that, under 'Scrolling', you will notice two check boxes, 'Show Row Region Splitter' and 'Show Column Region Splitter', if these are ticked for you... there lies ur problem.
I had already unchecked those two checkboxes. Here's a bit more background, and a solution.
The grid was docked to the left edge of a form under the control of an ultraDockManager. The dockable window containing the grid was narrower, so there was a scrollbar on the grid. Remember that the designer-generated code created two scroll regions, but also set MaxXXXScrollRegions to 1, so it was confused.
When I resized the dockable window so that the grid's scrollbar went away, the designer no longer created the scrollregions. If at run time I resize the dockable window narrower, the grid's scrollbar comes back, but not the extra scroll regions.
Looks like a designer bug to me. It should have created one scrollregion when the dockable window was too narrow, not two. I'm using v9.1, so it may have been fixed already.
Something in your code must be creating another scroll region.
One way this might happen is if your application is loading a layout into the grid.
Another possibility is that the designer code has somehow become corrupted. Try doing a search in your project for ScrollRegion and see if there are multiple regions being created by the form designer-generated code.
Hi.
I have the same to, and it seams to come when i leave the Designer Dialog, and it adds one more everytime i am getting out og the Desiger if i dont move theme.
I have seen this, myself. Unfortunately, all I have ever seen are the results - project in which the form has already become corrupt and the designer code is already adding an erroneous ScrollRegion. Without knowing how this occurred in the first place, though, there's no way to prevent it from happening.
I've got a bit of an update on this as I've also experienced this issue.
We had a number of instances where we would open a form containing a grid in design-mode, close it, re-open it again and another scroll region would have been created. This would continue until there were at least 10 row and 10 column scroll regions, at which point it would stop and not get any worse.
After examining the designer for the form, I noticed that loads of the following entries were being created, one on each close and re-open of the form containing the grid:
Me.grdTemplates.DisplayLayout.ColScrollRegions.Add(ColScrollRegion1) Me.grdTemplates.DisplayLayout.ColScrollRegions.Add(ColScrollRegion2) Me.grdTemplates.DisplayLayout.ColScrollRegions.Add(ColScrollRegion3) Me.grdTemplates.DisplayLayout.ColScrollRegions.Add(ColScrollRegion4)
I commented these out and the problem has gone away and hasn't re-occurred.
Does this shed any further light on the problem?
Hi Roger,
You probably want to find the definition of RowScrollRegion2 and delete it and any references to it just to keep things clean. There's no reason for that variable to exist or ever be referenced or use up any memory.
I have been having this problem too.
I have a wingrid on the form that is docked to fill. When the form is maximized on a screen that is larger than the application was designed on, the splitter bar appears.
I used the ScrollRegion search idea you presented earlier. In the Windows Form Design code I have the following:
Me.UltraGrid1.DisplayLayout.MaxColScrollRegions = 1
Me.UltraGrid1.DisplayLayout.MaxRowScrollRegions = 1
Further down I have this:
RowScrollRegion1.ScrollPosition = 0
RowScrollRegion2.ScrollPosition = 0
Me.UltraGrid1.DisplayLayout.RowScrollRegions.Add(RowScrollRegion1)
Me.UltraGrid1.DisplayLayout.RowScrollRegions.Add(RowScrollRegion2)
When I comment out the "Add(RowScrollRegion2)" line the splitter bar does not appear when the form and grid are maximized. Uncommenting brings the splitter back.
Roger