FlexGrid allows you to merge cells, making them span multiple rows or columns. This capability enhances the appearance and clarity of the data displayed on the grid. The effect of these settings is similar to the HTML <ROWSPAN> and <COLSPAN> tags.
To enable cell merging, you must do two things:
Once you have set the AllowMerging property, the FlexGrid automatically merges cells, grouping the data visually as showcased in the following image.
Cell merging has several possible uses. For instance, you can use this feature to create merged table headers, merged data views, or grids where the text spills into adjacent columns.
The following code shows how the FlexGrid appears after setting the AllowMerging property to Cells. The example uses the sample created in the Quick Start topic: