[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]ASP.NET WebForms Controls
 [Collapse]ASP.NET MVC Extensions
  [Expand]Product Information
  [Expand]Getting Started
  [Expand]Common Concepts
  [Collapse]Grid View
    Main Features
    [Expand]Binding to Data
    [Collapse]Data Representation Basics
       Data Columns
       Command Column
       Band Columns
       Unbound Columns
       Fixed Columns
      Customization Window
    [Expand]Data Shaping and Manipulation
    [Expand]Focus and Navigation
    [Expand]Data Editing and Validation
   [Expand]Visual Elements
   [Expand]Member Tables
  [Expand]Tree List
  [Expand]Card View
  [Expand]Pivot Grid
   Rich Text Editor
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Extensions
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Band Columns

The ASP.NET MVC GridView provides the ability to organize columns in logical groups (bands) and display them using multi-row header representation. A band is visually represented by a header displayed above the headers of the columns it combines.

Expanded Band Column Type

Each band is implemented as a specific column type - MVCxGridViewBandColumn.

A band column is a different kind of column - it is not designed to display data values directly (it does not support data operations such as sorting, grouping, etc.), but to contain other columns as children within its MVCxGridViewBandColumn.Columns collection. It is possible to have a hierarchy of nested bands by placing another band column into a band column's MVCxGridViewBandColumn.Columns collection. Note that you can store a data column and a band column at the same hierarchy level (i.e., within the same Columns collection).

The code sample below demonstrates how to create a banded layout.

Expanded Accessing Columns in a Banded Layout

Defining bands within a GridView implies having a hierarchical column structure. In this case, the GridView's GridViewSettings.Columns property only provides access to root level columns. To make it easier to traverse through all columns, GridView introduces a specific ASPxGridView.AllColumns (via MVCxGridView.AllColumns) property. It provides access to a read-only collection containing all grid columns.

Expanded End-User Manipulations

Bands are not only used for display purposes. They can be dragged by end-users to re-order columns or hide a group of columns within the grid's Customization Window. This is extremely useful if you need to provide a quick way to re-arrange or hide columns while preserving their logical grouping. Note that columns (and bands) are only allowed to be moved within their parent bands - you cannot move a child column from one parent band to another. This prevents end-users from breaking column grouping logic.

Resizing and column freezing features also work with bands. Note that you can only apply column freezing (controlled by the GridViewColumn.FixedStyle (via the MVCxGridViewColumn.FixedStyle) property to columns and bands located at the root hierarchy level (i.e., within the grid's GridViewSettings.Columns collection).

Is this topic helpful?​​​​​​​