Skip to main content
A newer version of this page is available. .

GridOptionsCustomization.AllowMergedGrouping Property

Gets or sets whether or not grouping by multiple columns at once is enabled.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v19.1.dll

Declaration

[DefaultValue(DefaultBoolean.Default)]
[XtraSerializableProperty]
public virtual DefaultBoolean AllowMergedGrouping { get; set; }

Property Value

Type Default Description
DefaultBoolean **Default**

A DefaultBoolean enumerator value that specifies whether or not grouping by multiple columns at once is enabled.

Available values:

Name Description
True

Corresponds to a Boolean value of true.

False

Corresponds to a Boolean value of false.

Default

The value is determined by the current object’s parent object setting (e.g., a control setting).

Property Paths

You can access this nested property as listed below:

Object Type Path to AllowMergedGrouping
AdvBandedGridView
.OptionsCustomization.AllowMergedGrouping
BandedGridView
.OptionsCustomization.AllowMergedGrouping
GridView
.OptionsCustomization.AllowMergedGrouping

Remarks

If merged column grouping is enabled, end-users can hold the Ctrl key when dragging column headers into the group panel to stack multiple headers in a line. Data Grid groups its data by all stacked columns at once.

Grid - Merged Grouping

Important

In Large Data Sources: Server and Instant Feedback Modes, merged column grouping is available only if you utilize the XPServerCollectionSource or XPInstantFeedbackSource components as data sources. Also, you are required to enable the AllowMergedGrouping property manually.

If the AllowMergedGrouping property equals DefaultBoolean.Default, merged grouping is disabled if the GridOptionsView.ShowGroupPanelColumnsAsSingleRow property is enabled or the WindowsFormsSettings.DefaultSettingsCompatibilityMode property equals v16.

To apply merged column grouping in code, place GridMultiColumnSortInfo object(s) inside the ColumnView.SortInfo collection. The code below applies two grouping layers: merged grouping by “Ship Country”, “Ship City” and “Ship Region” columns, followed by the tier two grouping by the “Customer ID” column.


gridView1.SortInfo.ClearAndAddRange(new[] {
    new GridMergedColumnSortInfo(
        new[] {
            colShipCountry, colShipCity, colShipRegion},
        new[] {
            ColumnSortOrder.Ascending, ColumnSortOrder.Descending, ColumnSortOrder.Ascending }),
    new GridColumnSortInfo(colCustomerID, ColumnSortOrder.Descending)
}, 2);
See Also