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.v20.1.dll

Declaration

[DefaultValue(DefaultBoolean.Default)]
[XtraSerializableProperty]
public virtual DefaultBoolean AllowMergedGrouping { get; set; }
<DefaultValue(DefaultBoolean.Default)>
<XtraSerializableProperty>
Public Overridable Property AllowMergedGrouping As DefaultBoolean

Property Value

Type Default Description
DefaultBoolean

Default

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

Property Paths

You can access this nested property as listed below:

Object Type Path to AllowMergedGrouping
AdvBandedGridView
.OptionsCustomization.AllowMergedGrouping
AdvBandedGridView
.OptionsCustomization.AllowMergedGrouping
BandedGridView
.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