Back to Devexpress

GridViewDataColumnSettings.AllowGroup Property

aspnet-devexpress-dot-web-dot-gridviewdatacolumnsettings.md

latest2.9 KB
Original Source

GridViewDataColumnSettings.AllowGroup Property

Specifies whether data grouping by the column’s values is enabled.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

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

Property Value

TypeDefaultDescription
DefaultBooleanDefault

True to enable grouping.
False to disable grouping.
Default to control the column’s behavior at the control level (the ASPxGridViewBehaviorSettings.AllowGroup property).

|

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
GridViewDataColumn

.Settings .AllowGroup

|

Remarks

Specify the AllowGroup property to control grouping at the column level.

If the column’s AllowGroup property is set to Default, the control determines the column’s behavior at the control level based on the ASPxGridViewBehaviorSettings.AllowGroup property value.

For more information on grouping in the grid, refer to the following topic: ASPxGridView - Group Data.

Run Demo: ASPxGridView - Grouping Data

aspx
<dx:ASPxGridView ID="grid" runat="server">
    <Columns>
        <dx:GridViewDataTextColumn FieldName="ContactName" VisibleIndex="0" />
        <dx:GridViewDataTextColumn FieldName="CompanyName" VisibleIndex="1">
            <Settings AllowGroup="False" />
        </dx:GridViewDataTextColumn>
        <%--...--%>
    </Columns>
    <Settings ShowGroupPanel="true" />
</dx:ASPxGridView>

See Also

GridViewDataColumnSettings Class

GridViewDataColumnSettings Members

DevExpress.Web Namespace