The AllowMerging property on the grid enables cell merging at the grid level. Once you have enabled merging at the grid level, use the Rows.AllowMerging and the Columns.AllowMerging properties to select the specific rows and columns that should be merged.
For example, the code below causes the grid to merge cells that contain the same names:
Visual Basic |
Copy Code
|
---|---|
' enable merging in the scrollable area c1FlexGrid1.AllowMerging = AllowMerging.Cells ' on column "Name" c1FlexGrid1.Columns("Name").AllowMerging = True |
C# |
Copy Code
|
---|---|
// enable merging in the scrollable area c1FlexGrid1.AllowMerging = AllowMerging.Cells; // on column "Name" c1FlexGrid1.Columns["Name"].AllowMerging = true; |