GridOptionsCustomization.AllowGroup Property

Gets or sets a value specifying whether end-users can apply data grouping.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v20.1.dll

Declaration

[DefaultValue(true)]
[XtraSerializableProperty]
public virtual bool AllowGroup { get; set; }
<DefaultValue(True)>
<XtraSerializableProperty>
Public Overridable Property AllowGroup As Boolean

Property Value

Type Default Description
Boolean

true

true if end-users can apply data grouping; otherwise, false.

Property Paths

You can access this nested property as listed below:

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

Remarks

End-users can apply data grouping in two ways. First by dragging a column header to the group panel. The second way is to right-click a column header and choose the context menu's Group By This Field item. Both these methods are allowed when the AllowGroup property value is true. Otherwise, column headers cannot be dragged to the group panel and the menu item is disabled.

When the AllowGroup option is enabled, you can specify which individual columns can be dragged to the group panel. Use the desired columns' GridColumn.OptionsColumn property for this purpose. Additionally, you can handle the GridView.DragObjectStart and GridView.DragObjectOver events for total control over column header dragging.

The column header context menu can be prohibited using the View's GridOptionsMenu.EnableColumnMenu option. Note that you can also handle the GridView.PopupMenuShowing and GridView.GridMenuItemClick events for more control over the context menu's availability and actions performed when clicking menu items.

Important note: data grouping requires data sorting to be performed. Thus, end-users can group data only when the View's GridOptionsCustomization.AllowSort and the desired columns' OptionsColumn.AllowSort options are enabled.

See Also