Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]Welcome to DevExpress .NET Documentation
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
   Reporting
  [Collapse]Data Grid
   [Expand]Getting Started
   [Expand]Implementation Details
   [Expand]Views
   [Collapse]Grid View Data Layout
    [Collapse]Columns, Bands and Card Fields
      Accessing and Identifying Columns
      Creating Columns and Binding Them to Data Properties
      Using Bands
      Hiding and Displaying Columns and Bands
    [Expand]Rows and Cards
    [Expand]Nodes
     Data Cells
     Compact Mode
   [Expand]Binding to Data
   [Expand]Master-Detail Data Representation
   [Expand]Data Editing and Validation
   [Expand]Grouping
   [Expand]Selection
   [Expand]Filtering and Searching
   [Expand]Sorting
   [Expand]Data Summaries
   [Expand]Data Scrolling
   [Expand]Focus and Navigation
   [Expand]Conditional Formatting
   [Expand]Drag-and-Drop
   [Expand]Appearance Customization
   [Expand]MVVM Enhancements
   [Expand]Printing and Exporting
   [Expand]End-User Interaction
   [Expand]Miscellaneous
   [Expand]Performance Improvement
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Expand]End-User Capabilities
   [Expand]Examples
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Hiding and Displaying Columns and Bands

Columns and card fields are represented by GridColumn objects. Bands are represented by GridControlBand and TreeListControlBand objects. To hide a column or a band, set its BaseColumn.Visible property to false. If a column's ColumnBase.ShowInColumnChooser option is enabled, when the column is hidden its header is displayed in the Column Band Chooser.

To show a hidden column or band, set its BaseColumn.Visible property to true. To show it at a specified position among visible columns and bands, use its BaseColumn.VisibleIndex property.

Expanded End-User Capabilities

An end-user can temporarily hide columns and bands by dragging their headers to the Column Band Chooser. The Column/Band Chooser can be shown via a column header's popup menu. Dragging a header from the Column Chooser to the header panel shows the column or band within a view.

To allow an end-user to hide columns and bands, the following options must be enabled.

If the DataViewBase.AllowMoveColumnToDropArea property is set to true, an end-user can hide a column or a band by dropping its header outside the View.

Expanded Accessing Visible and Hidden Columns

The grid stores its columns (visible and hidden) in the GridControl.Columns collection. Individual columns and bands can be accessed by name or indexed notation.

To only access visible columns (whose BaseColumn.Visible property is set to true), use the GridViewBase.VisibleColumns property of the view. This property returns a list containing GridColumn objects that correspond to columns displayed within the view.

Hidden columns that are displayed within the Column/Band Chooser are stored within the view's DataViewBase.ColumnChooserColumns read-only collection.

Individual columns can be accessed using indexed notation.

Expanded Overlaying Band Header

When the BandBase.OverlayHeaderByChildren property is set to true, the band's children (child bands and columns) hide the band's header and occupy its space.

Note

When the band's BandBase.OverlayHeaderByChildren property is set to true, and the band has no children, the band's header will be displayed.

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