Hi,
I have a grid that I want to merge.
The merging needs to be by a column, but I don't want to display this column.
Is there a way to do this?
Thanks,Yael
Hi Yael,
I don't understand what you mean. What does it mean to merge a column that is not visible?
I will give an example:
I have 3 columns in the dataSource: A, B, C.
I wrote this:
void grdGrades_InitializeLayout(object sender, InitializeLayoutEventArgs e) { //// MERGED CELL FUNCTIONALITY RELATED ULTRAGRID SETTINGS //// ------------------------------------------------------------------------ // Set the merged cell style to the OnlyWhenSorted. e.Layout.Override.MergedCellStyle = MergedCellStyle.OnlyWhenSorted; e.Layout.Override.MergedCellContentArea = MergedCellContentArea.VisibleRect; e.Layout.Override.HeaderClickAction = HeaderClickAction.SortMulti; // ------------------------------------------------------------------------
e.Layout.Bands[0].SortedColumns.Add("A", false); e.Layout.Bands[0].SortedColumns.Add("B", false); e.Layout.Bands[0].SortedColumns.Add("C", false); }
So if I have this data:
row 1: aaa, bbb, ccc
row 2: aaa, bbb, c
row 3: a, bbb, cc
In the grid, it will be displayed like this:
C
B
A
ccc
bbb
aaa
c
cc
a
I don't want to display column A, but I still want that columns B and C will be affected by it.
so I want that even when column A is hidden, the grid will look like this:
Please help me to find a solution.