An introduction to Merging Cells using the WebHierarchicalDataGrid™ control feature.
Prerequisite materials to understanding this topic.
Cell merging enables you to sort or group data within the WebHierarchicalDataGrid and display that data with cells containing the same values merged into a single cell. The cells only appear merged; the grid structure is not affected by the use of this function. Cell merging works with both the sorting behavior and grouping settings of the WebHierarchicalDataGrid .
The following screens illustrate an unmerged display (Figure 1) and a merged display (Figure 2). As you can see the merged display below (Figure 2), has sorted the records, gathering those records with the same region and displaying region as a single merged cell with one instance of the cell’s data.
By default, Cell Merging is disabled. Refer to the topic, Enabling Cell Merging for information on enabling this feature.
Cell merging can be independently enabled or disabled for either sorting behavior or grouping settings. A detailed explanation of how cell merging impacts each of these follows.
The following screen shot illustrates how the data of a sorted WebHierarchicalDataGrid appears with Cell Merging enabled.
A close inspection of Figure 3 - Examples of Sort with Cell Merging Enabled reveals the effects of using the WebHierarchicalDataGrid ’s sorting behavior with Cell Merging enabled. In the sorting example, the sort criteria is for records where Country = ‘USA’, as you can see records meeting these criteria appear clustered together at the top of the grid.
Figure 3 - Examples of Sort with Cell Merging Enabled
The following screen shot illustrates the effect of WebHierarchicalDataGrid ’s group setting with Cell Merging enabled.
As you can see the country column contains values representing different countries, in this case the UK and USA . When displayed, the records are grouped by country where the value within the country cells has the same values, as in this example records belonging to either the UK or the USA are visually merged with other records belonging to the same country. Additionally, note that a row appears before the grouped records identifying the item grouped, its value and a record count. In this case Country, UK and USA with 4 and 5 records respectively.
The following topics provide additional information related to this topic.
The following samples provide additional information related to this topic.