List Views: Banded Column Layout
- 3 minutes to read
A band groups multiple columns under the same header.
Platform-Specific Components and Features
Platform | Component | Feature | XAF Built-In List Editor |
---|---|---|---|
ASP.NET Core Blazor | DxGrid | DxGridBandColumn | DxGridListEditor |
ASP.NET Core Blazor | DxTreeList | DxTreeListBandColumn | DxTreeListEditor |
Windows Forms | Data Grid | Banded Grid Views | GridListEditor |
ASP.NET Web Forms | Grid View | Header Bands | ASPxGridListEditor |
Add and Configure Bands
To configure bands in the same manner across all platforms, navigate to the YourSolutionName.Module project and run the Model Editor for the Model.DesignedDiffs.xafml file.
For platform-specific configuration, run the Model Editor for the Model.xafml file in the following projects:
- ASP.NET Core Blazor: YourSolutionName.Blazor.Server
- Windows Forms: YourSolutionName.Win
In the Model Editor, navigate to the Views | <Project>.BusinessObjects | <Class> | <Class>_ListView | BandsLayout node and set the Enable property to true
.
Bands Layout
The IModelBandsLayout node’s structure in the Application Model determines the bands layout.
Select the Add… | Band context menu command to add an IModelBand child node. Drag-and-drop columns into the newly created band (node). You can add a band to an existing band and create a multi-level band hierarchy.
Note
Step-by-step instructions on how to configure bands layout is available in the following topic: How to: Configure Bands in a Grid List Editor.
End-User Layout Customization
An end-user can do the following:
- Rearrange bands
- Reorder columns within a band
- Move columns and bands from one parent band to another (Windows Forms)
To undo runtime layout customization in the current View, use the Reset View Settings Action. For more information about runtime layout customization, refer to the following topic: List View Columns Customization.
Additional Configuration Options (Windows Forms)
Multi-Level Bands
XAF Windows Forms applications allow you to arrange column headers across rows. You can also stretch column headers vertically to occupy more than one row.
Note
XAF ASP.NET Core Blazor and ASP.NET Web Forms applications do not support multi-level bands.
Use the RowIndex property of the Views | <ListView> | BandsLayout | Band | Column node to specify the column header vertical position.
This property specifies the zero-based row number of the current column within a band. In the following image, the Subject column’s RowIndex
is 1
. The RowIndex
of the other column within the same band is 0
:
Header Visibility
Use the ShowBands and ShowColumnHeaders properties of the Views | <ListView> | BandsLayout node to hide band and column headers.
Restrict End-User Layout Customization
To restrict layout customization, use the following properties of the Views | <ListView> | BandsLayout node: