

It's important to mention that if a suppress group is defined, no other group may be created. The last sample will create a suppress group. The repeating values are suppressed, and a summary operation is performed on the other columns.īelow we can see the code and the grid appearance for the composite group: The second defines a suppress group, that has the same behavior of the sql GROUP BY clause. With a few more lines of code we can improve the visual aspect of the grid: If the summary is automatic the event occurs after the summary row be added and after the summary values be placed in the row. Occurs after the general summaries be calculated. The event is not triggered if the group is not automatic, but will be triggered if the group is a suppression group (will be seen later on).

Occurs when the summary row is generated for the group.

The event is not triggered if the group is not automatic. Occurs when an automatic header row is added for the group. Occurs when a new group starts, it means, when new values are found in the group column. GridViewHelper has events to allow easy implementation of visual or functional adjusts. Visualization is compromised when there is more than one group. It's possible to create more than one group in the grid, simulating a hierarchical grouping, as seen below: We need just one more line to register the summary to the group: Let's make something more interesting, let's add a summary to the created group. In case of group summaries, generation of all cells or only the needed cells is a group attribute. Using the footer, all the cells are created. When a new row is added to the grid, only the required cells to display the summarized columns are created. Another option is to use the footer row to display the summary instead of creating a new one.

In this sample a new line was added to display the summary. To create a summary for the ItemTotal column we need only the promised 2 lines of code:
