ASPxGridView.GroupCount Property
Gets the number of grouped columns.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.1.dll
NuGet Package: DevExpress.Web
Declaration
Property Value
Type | Description |
---|---|
Int32 | The number of columns. |
Remarks
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.
<dx:ASPxGridView ID="grid" runat="server" OnBeforeGetCallbackResult="grid_BeforeGetCallbackResult">
<ClientSideEvents EndCallback="OnEndCallback" />
<Settings ShowGroupPanel="true" />
<%--...--%>
</dx:ASPxGridView>
<br />
<div>
Grouped columns count: <span id="groupCount" style="font-weight: bold">0</span>
</div>
function OnEndCallback(s, e) {
document.getElementById("groupCount").innerHTML = s.cpGroupCount;
}
protected void grid_BeforeGetCallbackResult(object sender, EventArgs e) {
grid.JSProperties["cpGroupCount"] = grid.GroupCount;
}
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GroupCount 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.