Working with FlexGrid > Merge > Merging cells |
The AllowMerging property on the grid enables cell merging at the grid level. Once you enable merging at the grid level, use the Row.AllowMerging and the Column.AllowMerging properties to select the specific rows and columns to merge.
For example, the code below merges cells that contain the same country:
C# |
Copy Code
|
---|---|
// enable merging in the scrollable area fg.AllowMerging = AllowMerging.Cells; // on columns "Country" and "FirstName" fg.Columns["Country"].AllowMerging = true; fg.Columns["FirstName"].AllowMerging = true; |
This code creates the grid below: