Grouping grid rows

Applies to
All grid based ApexSQL tools

This article will cover all aspects of grouping columns in grids, including multiple and merge grouping.


In this article all grouping options and features will be explained and will be shown how to use them in the best way. We will use ApexSQL Enforce and ApexSQL Backup as example applications for this article.


Many ApexSQL apps group grid results by default. The default grouping can be changed though, at any time.

There are three ways to set grouping:

  • By a single column
  • By multiple columns (multiple grouping)
  • By multiple columns (merge grouping)

Single column

To group the results by a single column, first be sure that the group panel is clear, empty. To do that, right click on the column’s header in the group panel, and from the context menu choose the Ungroup command:

Or right click anywhere in the group panel and from the context menu choose the Clear grouping command.

Regardless of the chosen way, the grouping panel will be cleared and the column will be restored in the grid. Now in the grouping panel a message will be present “Drag a column header here to group by that column”:

To group by any column, click on the column’s header, drag it to the group panel and drop it. Or right-click on the column’s header and from the context menu choose the Group by this column command:

Multiple columns

To group the results by multiple columns, simple repeat the drag and drop column’s header action. This way one by one column will be added to the group panel, creating a column’s tree, which will group the results by the hierarchy of the added columns.

Merged column grouping is when grouping is done by several columns at the same time. To do that, hold the Ctrl keyboard key and click on the column’s header. Drag it to the group panel, and when two arrows appear, marking the position of the column, drop it.

This way the results will be divided into groups that fulfill all conditions at the same time.

Q: Can a position of a column be changed in the group panel, when multi grouping or merged grouping is done?

A: Yes, in the group panel, the position of the column can be changed by clicking on the column’s header and drag it to the desired position.

Q: Can multi grouping and merged grouping be combined?

A: Yes. You have no limitation in grouping combinations. When you want multiple grouping on a specific column, click on that column’s header, drag and drop it in the grouping panel. When you want to add merged grouping for another column, click on the column’s header, hold the Ctrl keyboard key, drag and drop it in the group panel.

Q: Will grouping and sorting settings be saved between sessions?

A: Yes, all of these settings will be saved between sessions.

See also

For a list of all articles on ApexSQL grid customization and usage see: