I have successfully implemented column groups in my wingrid via the row layouts. Now that I've done that, I need to freeze the first group (containing the first two data columns) so as I scroll horizontally that group stays put.
I've tried everything I can think of based on what I've found in your forum, but nothing seems to work. Since I have three grouped headings, I had to create two groups for the first two columns. One is the parent of the other. The groups are named GC_Empty and Empty and contain data columns 1 and 2 (column 0 is hidden). So I assumed that I would do one of the following (or both)
1. GC_Empty.Header.Fixed = true;
Empty.Header.Fixed = true;
2. band.Columns[1].Header.Fixed = true;
band.Columns[2].Header.Fixed = true;
Then afterwards: ugManagers.DisplayLayout.Override.FixedCellSeparatorColor = Color.Red;
Thanks in advance,
Paul
Now that I have the scroll region working, I noticed that if I click on the vertical region divider, I am able to click and drag it to the right. Is there a way to turn off this feature? I don't want the users to be futzing with the scroll divider.
I changed my program to use regular grouping instead of rowlayout. So now I have two groups on one grouping row, and the scrollregion works.
Could someone in the development department try to figure out a way that you can do scroll region exclusivity with rowlayout grids? Thanks...
So it looks like I am stuck. I have to use rowlayout because I have nested groups, and I can't implement the ExclusiveColScrollRegion because of it. I have to have multiple groups. That's a part of the requirement.
What can I do then to make the right hand scroll region not show what's in the left side? That MUST have entered in the minds of the developers when they were designing these features.
paul
Hi Paul,
What I meant by "nested" is having a group inside another group. You seem to have that here, so you need RowLayouts to achieve this.
So you can probably achieve what you want using the ColScrollRegions. To remove the first group from any but the first ColScrollRegion what you do is set:
band.Groups[0].Header.ExclusiveColScrollRegion = band.Layout.ColScrollRegions[0];
Sorry... I just realized that ExclusiveColScrollRegion isn't going to work in RowLayout mode either. It cannot, because there's no way to know that the exclusive columns are on the left side of the layout. They could be mixed in or even overlap other columns.
So I don't think there is any way to achieve the layout you are using here and still "fix" a group.
Hmmmm. I do have two groups. Each has 6 3-column groups under it. Don't know if that qualifies as nested, but I think it might. Could I do this kind of thing without having to use RowLayout? Then I could use the standard group freezing.
Here's what I have:
| Major Group 1 | Major Group 2 |
| Minor Group 1 | Minor Group 2 | Minor Group x | Minor Group 1 | Minor Group 2 | Minor Group x |
|col1 | col2 | col3 | ....