Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [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]Getting Started
    [Collapse]Walkthroughs
     [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]Grouping
     [Expand]Filter and Search
     [Expand]Sorting
     [Expand]Summaries
     [Expand]Split Presentation
     [Expand]Row Preview Sections
     Data Grid and Views
   [Expand]Data Binding
   [Expand]Views
   [Expand]Data Editing and Validation
   [Expand]Grouping
   [Expand]Sorting
   [Expand]Filter and Search
   [Expand]Summaries
   [Expand]Focus and Selection Handling
    Formatting Cell Values
   [Expand]Master-Detail Relationships
   [Expand]Asynchronous Image Load
   [Expand]Export and Printing
   [Expand]Appearance and Conditional Formatting
    Split Presentation
    Row Preview Sections
    Scrolling
   [Expand]Batch Modifications
   [Expand]Hit Information
    Hints
   [Expand]Popup Menus
   [Expand]Saving and Restoring Layouts
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]Examples
   [Expand]End-User Capabilities
    Included Components
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap 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]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

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

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