Show theme settings Shopping cart Download trialFree Trial
Change Theme Settings
Change Theme Settings
Themes
 
Show All Themes
v
...v

Headers Bands

Drag a column header here to group by that column
Sales Person 
Order 
Company 
Date 
Product 
Qty 
Name 
Country 
Region 
Name 
Unit Price 
Andrew FullerBlondesddsl père et filsFrance 7/25/2018Alice Mutton$31.2030
Andrew FullerBlondesddsl père et filsFrance 7/25/2018Outback Lager$12.0020
Andrew FullerMorgenstern GesundkostGermany 8/9/2018Rössle Sauerkraut$36.4020
Andrew FullerMorgenstern GesundkostGermany 8/9/2018Tarte au sucre$39.4012
Andrew FullerBerglunds snabbköpSweden 8/14/2018Guaraná Fantástica$3.6012
Andrew FullerBerglunds snabbköpSweden 8/14/2018Pâté chinois$19.2020
Andrew FullerBerglunds snabbköpSweden 8/14/2018Rhönbräu Klosterbier$6.2030
Andrew FullerVins et alcools ChevalierFrance 9/2/2018Gnocchi di nonna Alice$30.404
Andrew FullerMagazzini Alimentari RiunitiItaly 9/9/2018Louisiana Hot Spiced Okra$13.6030
Andrew FullerMagazzini Alimentari RiunitiItaly 9/9/2018Scottish Longbreads$10.0020
Page 1 of 216 (2155 items)Prev1234567214215216Next


The Grid View's multi-row headers feature allows you to organize grid columns in logical groups (bands). This demo illustrates basic band functionality.

A band is visually represented by a header displayed above headers of the columns it combines. Each band is realized as a specific column type - MVCxGridViewBandColumn. A band column is a different kind of column - it is designed not to display data values directly, but to contain other (child) columns within its Columns collection. Therefore, it is possible to have a hierarchy of nested bands. Moreover, you can place a data column and a band column at the same hierarchy level. To add a data column use a column collection's Add method to add a band column - the AddBand method.

Bands are not only used for display purposes. They can be dragged by end-users to re-order columns. This is extremely useful if you need to provide a quick way to re-arrange columns while preserving their logical grouping. Note that columns (and bands) are only allowed to move 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 fine with bands. The only note is that column freezing (controlled by the FixedStyle property) can be applied only to columns and bands located at the root hierarchy level (i.e. within the grid's Columns collection).


See Also:
Collapse/Expand
Local Copy of this Demo
To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer.
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
Open CS Solution
The source code files for this demo are installed (by default) in the following directory:
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\MVCxGridViewDemos