Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Collapse]ASP.NET Bootstrap Controls
 [Expand]Getting Started
 [Collapse]Grid View
  [Expand]Binding to Data
  [Expand]Data Representation Basics
  [Expand]Data Summaries
  [Expand]Filtering
  [Collapse]Grouping
    Grouping Overview
    Grouping in Code
   Sorting
  [Expand]Focus and Navigation
  [Expand]Data Editing
  [Expand]Master-Detail Relationship
   Export Overview
   Data-Toggle Attribute
 [Expand]Charts
 [Expand]Data Editors
 [Expand]Site Navigation and Layout
 [Expand]API Reference
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Grouping in Code

This document consists of the following sections.

Expanded Server-Side Approach

To group data on the server, do one of the following:

To ungroup data, do one of the following:

The following methods allow you to manipulate group rows from server code:

Member Description
ASPxGridView.ExpandAll Expands all group rows.
ASPxGridView.ExpandRow Expands the specified group row and optionally child group rows at all nesting levels.
ASPxGridView.CollapseAll Collapses all group rows.
ASPxGridView.CollapseRow Collapses the specified group row and optionally any child group rows at all nesting levels.

Expanded Client-Side Approach

To group data on the client, use the ASPxClientGridView.GroupBy method.

To ungroup data, call the ASPxClientGridView.UnGroup method.

To prevent grouping, handle the ASPxClientGridView.ColumnGrouping client event. The processed client column is identified by the event parameter's column property. To cancel the operation, set the cancel property to true.

The following methods allow you to manipulate group rows from client code:

Member Description
ASPxClientGridView.ExpandAll Expands all group rows.
ASPxClientGridView.ExpandRow Expands the specified group row and optionally child group rows at all nesting levels.
ASPxClientGridView.CollapseAll Collapses all group rows.
ASPxClientGridView.CollapseRow Collapses the specified group row and optionally child group rows at all nesting levels.

How would you rate this topic?​​​​​​​