Skip to main content

ASPxGridView.GroupCount Property

Gets the number of grouped columns.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.2.dll

NuGet Package: DevExpress.Web


public int GroupCount { get; }

Property Value

Type Description

The number of columns.


ASPxGridView allows users to group its data by multiple columns. Use the GroupCount property to obtain the number of grouped columns.

To access the collection of grouped columns, call the GetGroupedColumns() method.

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

ASPxGridView - GroupCount

<dx:ASPxGridView ID="grid" runat="server" OnBeforeGetCallbackResult="grid_BeforeGetCallbackResult">
    <ClientSideEvents EndCallback="OnEndCallback" />
    <Settings ShowGroupPanel="true" />
<br />
    Grouped columns count: <span id="groupCount" style="font-weight: bold">0</span>
function OnEndCallback(s, e) {
    document.getElementById("groupCount").innerHTML = s.cpGroupCount;
protected void grid_BeforeGetCallbackResult(object sender, EventArgs e) {
    grid.JSProperties["cpGroupCount"] = grid.GroupCount;

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


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.

See Also