Back to Devexpress

OptionsColumn.AllowGroup Property

windowsforms-devexpress-dot-xtragrid-dot-columns-dot-optionscolumn-5c535a59.md

latest4.5 KB
Original Source

OptionsColumn.AllowGroup Property

Gets or sets whether end-users can drag the column’s header to the group panel to group data against the column’s values.

Namespace : DevExpress.XtraGrid.Columns

Assembly : DevExpress.XtraGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(DefaultBoolean.Default)]
[XtraSerializableProperty]
public DefaultBoolean AllowGroup { get; set; }
vb
<DefaultValue(DefaultBoolean.Default)>
<XtraSerializableProperty>
Public Property AllowGroup As DefaultBoolean

Property Value

TypeDefaultDescription
DefaultBooleanDefault

A DefaultBoolean enumeration value specifying whether end-users can drag the column’s header to the group panel.

|

Available values:

NameDescriptionReturn Value
True

The value is true.

|

0

| | False |

The value is false.

|

1

| | Default |

The value is specified by a global option or a higher-level object.

|

2

|

Property Paths

You can access this nested property as listed below:

Object TypePath to AllowGroup
GridColumn

.OptionsColumn .AllowGroup

|

Remarks

Set the AllowGroup property to the DefaultBoolean.False value to prevent end-users from dragging the column’s header to the group panel. The data can however still be grouped against the column’s values via code regardless of the value of the column’s AllowGroup property.

If this property is set to the DefaultBoolean.Default value, the ability to drag the column’s header to the group panel is determined by the View’s GridOptionsCustomization.AllowGroup option.

Important note : data grouping requires data sorting to be performed. Thus, end-users can only group data when the column’s values can be sorted.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AllowGroup property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

XAF-how-to-add-an-unbound-column-to-gridlisteditor-to-execute-a-custom-action-for-a-record/CS/EFCore/ButtonInListEF/ButtonInListEF.Win/Controllers/SimpleBusinessActionGridListViewController.cs#L62

csharp
buttonColumn.OptionsColumn.AllowEdit = true;
buttonColumn.OptionsColumn.AllowGroup = DefaultBoolean.False;
buttonColumn.OptionsColumn.AllowMove = false;

See Also

AllowGroup

AllowColumnMoving

AllowMove

AllowSort

Group()

OptionsColumn Class

OptionsColumn Members

DevExpress.XtraGrid.Columns Namespace