I can only see that this is possible in a WebGrid. Can anyone help to determine whether this is possible in a grid with a single band of data?
To elaborate, three of the column headers will be different geographical regions, and so I would like a header that spans above all the individual column headers that says "Regions".
I've been searching the forums and knowledge base but I can't see any clues - any help is much appreciated!
Thanks.
Mike Add to my property RowLayoutStyle code and the results are not expected (see file), please help me with a code sample, I detail the code used.
grid.DisplayLayout.Bands[0].RowLayoutStyle = RowLayoutStyle.GroupLayout;grid.DisplayLayout.Bands[0].Columns["Column1"].Header.Caption = "Column1";grid.DisplayLayout.Bands[0].Columns["Column2"].Header.Caption = "Column2";grid.DisplayLayout.Bands[0].Groups.Add("Group1", "Group1");grid.DisplayLayout.Bands[0].Groups["Group1"].Columns.Add(grid.DisplayLayout.Bands[0].Columns["Column1"]);grid.DisplayLayout.Bands[0].Groups["Group1"].Columns.Add(grid.DisplayLayout.Bands[0].Columns["Column2"]);grid.DisplayLayout.Bands[0].Columns["Column3"].Header.Caption = "Column3";grid.DisplayLayout.Bands[0].Columns["Column4"].Header.Caption = "Column4";
Greetings
Hi,
The best way to do this would be to use the RowLayoutStyle property and set it to GroupLayout. Column1 and Column2 would belong to Group1. Column3 and Column4 do not belong to any group and they span the height of the entire group.
In the excel file is an example, my problem is that the column 3 and 4 look like in the example
Mike
I want to make the column 3 and 4 look like this:
Andrej Kuklin said:Can I for instance "collapse" the whole group, so that the columns in the group are not visible?
No, there's no built-in way to collapse a group. You could set the group width to 0, I guess.
Andrej Kuklin said:Or move the groups around like columns (changing the order of columns in the grid)?
Yes, by setting AllowGroupMoving, just like AllowColMoving.
Andrej Kuklin said:Can I configure the auto-size behavior (double-click on the border of the group header -> all columns in the group will be autosized)?
I'm not really sure about this. I don't think a group has any autosizing functioanlity, though.