[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Collapse]Data Grid
   [Collapse]Get Started With Data Grid and Views
     [Expand]Appearance and Conditional Formatting
     [Expand]Data Editing
     [Expand]Hit Information
     [Expand]Data Binding and Working with Columns
     [Expand]Grid View - Columns, Rows and Cells
     [Collapse]Banded Views
       Tutorial: Banded Grid View - API
       Tutorial: Banded Grid View - Basics
       Tutorial: Banded Grid View - Fixed Bands
       Tutorial: Banded Grid View - User Customization
     [Expand]WinExplorer View
     [Expand]Tile View
     [Expand]Filter and Search
     [Expand]Split Presentation
     [Expand]Row Preview Sections
   [Expand]Data Binding
    Unbound Columns
   [Expand]Data Editing and Validation
   [Expand]Filter and Search
   [Expand]Focus and Selection Handling
    Format Cell Values
   [Expand]Master-Detail Relationships
   [Expand]Asynchronous Image Load
   [Expand]Export and Printing
   [Expand]Appearance and Conditional Formatting
    Split Presentation
    Row Preview Sections
   [Expand]Batch Modifications
    Hit Information
    Popup Menus
   [Expand]Save and Restore Layout
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]End-User Capabilities
    Included Components
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Expand]Chart Control
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[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)

Tutorial: Banded Grid View - User Customization

This walkthrough is a transcript of the Banded Grid View - User Customization video available on the DevExpress YouTube Channel.

In this tutorial, you will learn about band customization features available to end-users at runtime, including band resizing, band and column re-ordering, hiding and displaying bands. The tutorial will also show you how to override the functionality available to end-users by default.

Expanded Default Behavior

At runtime, end-users can resize any grid band by dragging the band's right edge.

They can drag-and-drop band headers to reorder bands along with their child columns.

Note though that columns and bands can only be moved within their parent bands. Thus, bands allow end-users to re-arrange columns while preserving their logical grouping.

The grid supports the Microsoft Outlook style Customization Form, which can be invoked using the band or column header context menu.

Drag-and-drop a band's header to the Customization Form to hide the band along with its child columns.

To display a band, drag it back to the band panel.

End-users can also quickly hide bands by dragging their headers away from the header panel.

Now see how to control which of these features are available to end users.

Expanded Disabling Band Resizing

If you want to prevent end-users from resizing a particular band, disable this band's OptionsBand.AllowSize option accessible using the GridBand.OptionsBand property.

Run the application to see that the Model band's right edge cannot be dragged. However, end-users can still resize other bands, which can still affect the Model band's width.

Close the application and disable band resizing for the entire View. To do this, expand the View's BandedGridView.OptionsCustomization property and disable the BandedGridOptionsCustomization.AllowBandResizing option.

Run the application again. No bands allow resizing operations.

Expanded Allowing Changing Parent Bands

To enable column and band drag-and-drop between parent bands, go to the Property grid displaying the View's settings, expand BandedGridView.OptionsCustomization and enable the BandedGridOptionsCustomization.AllowChangeBandParent and BandedGridOptionsCustomization.AllowChangeColumnParent options.

As a result, end-users can change column and band positions without any restrictions.

Expanded Disabling Band Re-Ordering

The grid also allows you to prohibit re-ordering of individual or all bands. Open the Property grid displaying the Model band's settings, expand the GridBand.OptionsBand property and disable the OptionsBand.AllowMove option.

Now you cannot change this band's position by dragging its header. It can still change its position as a result of re-ordering other bands.

To disable band re-ordering for the entire view, set the View's BandedGridOptionsCustomization.AllowBandMoving property to false. As a result, end-users cannot move or hide bands.

Reset these settings to enable band drag and drop again.

Expanded Restricting Hiding and Displaying Bands

After that, disable the View's GridOptionsCustomization.AllowQuickHideColumns option. As a result, bands with their nested columns cannot be hidden by dragging them away from the header panel. However, end-users can still use the Customization Form.

Once headers are displayed in the Bands tab, they can be dragged back to the View. The grid allows you to override this. Set the Model band's OptionsBand.ShowInCustomizationForm property to false. Now when you hide this band, it disappears and its header is not displayed in the Customization Form.

If you disable the View's BandedGridOptionsCustomization.ShowBandsInCustomizationForm option, the Bands tab is not displayed at all.

Expanded See Also

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