Skip to main content
Tab

GridViewDataColumn.GroupBy() Method

Groups data by the values of the current column.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.2.dll

Declaration

public void GroupBy()

Remarks

Call a column’s server-side GroupBy method to group data in the grid by this column’s values.

To clear grouping applied to a particular column on the server side, call the ASPxGridView.UnGroup or GridViewDataColumn.UnGroup method.

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

<dx:ASPxGridView ID="grid" runat="server" AutoGenerateColumns="False" KeyFieldName="CustomerID">
    <Columns>
        <dx:GridViewDataTextColumn FieldName="Country" VisibleIndex="0" />
        <%--...--%>
    </Columns>
    <Settings ShowGroupPanel="true" />
</dx:ASPxGridView>
protected void Page_Load(object sender, EventArgs e) {
    var column = grid.Columns["Country"] as GridViewDataColumn;
    column.GroupBy();
}
See Also