Log In
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Report Server
[Collapse]eXpressApp Framework
 [Expand]Getting Started
  [Expand]Application Solution Components
  [Expand]Business Model Design
  [Expand]Application Model
  [Collapse]UI Construction
    UI Element Overview
    Windows and Frames
    Action Containers
     Ways to Show a View
     List View Column Generation
     List View Columns Customization
     List View Bands Layout
     List View Edit Modes
    [Expand]List View Data Access Modes Overview
     Display Properties of a Referenced Object in the Master Object's View
   [Expand]View Items
    List Editors
    Add and Override Images
    Text Notifications
    ASP.NET Web Application Appearance
    Application Personalization
    Using a Custom Control that is not Integrated by Default
  [Expand]Extend Functionality
  [Expand]Data Manipulation and Business Logic
  [Expand]Security System
  [Expand]System Module
  [Expand]Extra Modules
  [Expand]Debugging and Error Handling
  [Expand]Application Life Cycle
 [Expand]Design-Time Features
 [Expand]Functional Testing
 [Expand]Task-Based Help
 [Expand]Frequently Asked Questions
 [Expand]API Reference
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

List View Columns Customization

When you implement a persistent object, XAF automatically generates two List Views to represent this object in the UI – the general List View and Lookup List View. These List View settings are represented by the Views | ClassName_ListView and Views | ClassName_LookupListView Application Model nodes. These nodes expose lists of columns (see IModelListView.Columns). The default set of columns is generated according to rules described in the List View Column Generation topic. You can change a column's visibility, width, order, filtering, etc., (either at run-time or using the Model Editor). This topic details different aspects of List View customization if the List View is represented by the GridListEditor.

Expanded Design-Time Customization

Design-time customizations can be performed in the Model Editor. If you require customizations to affect both WinForms and ASP.NET applications, you should perform the customizations at the Module Project level. To customize a WinForms application only, perform them at the Windows Forms Module Project level. To customize an ASP.NET Web application only, perform them at the ASP.NET Web Module Project level.

Each ListView node has a Columns child node, providing access to column settings. When the Columns node is selected, the property list to the right is replaced with a design surface that imitates the current View's grid, filled with sample data. This allows you to see how the grid will be displayed at runtime. Note that the WinForms Data Grid is displayed at design time, however, the customizations are correctly applied for both WinForms and ASP.NET applications. The Columns node exposes a tree of nodes representing the set of columns available in the current view. Each node provides access to the complete set of column properties.

If the default configuration does not meet your requirements, you can modify it. Scale columns by dragging a separator between two column headers, or drag and drop column headers to re-arrange columns. You can hide a column by dragging it outside the table. You can also apply sorting, grouping and filtering. To show hidden columns, right-click on the table header and choose Column Chooser.

The Customization window will be invoked and you can drag the required column from the Customization window to the View, and vice versa. Follow the graphical prompts that show the column's future location.

You can use Add... and Remove buttons to manage the properties displayed in the Customization window. To display a property that is not in the list (for instance, a property of a referenced object or custom field), click Add..., in the Object Model window, choose the required property and click Add. The property will appear in the Customization window and you will be able to add it to the grid as described above.

If you need to apply a summary, select the ListView node, set its IsFooterVisible property to True, then select ListView | Columns node. The footer will appear in the List View and you can add the required summaries to it.

In addition to the capability to visually configure columns, the following customizations are available using the Columns node's child nodes.

  • Show, hide and reorder columns.
    The Columns' child nodes have the Index property. Use this property to set the order of columns. A negative value hides the corresponding column.
  • Group columns
    Set a column's GroupIndex property to a non-negative integer value. This value represents that column's position within the collection of group columns. The GroupIndex property's value determines the grouping level. For instance, if the index is 0, rows will be grouped against this column first and then against the following groups of columns. To ungroup a row by a specific column, set the column's GroupIndex property to -1.
  • Edit caption
    Assign a string to a column's Caption property. This string will be displayed as the column name.

To learn more about the available customizations, refer to the IModelColumn members list.


You can arrange columns into a logical groups (bands). For details, refer to the List View Bands Layout topic.


The changes that you perform in the Model Editor invoked for a module (application project) are saved to the Model.DesignedDiffs.xafml (Model.xafml) file located in this module project. These changes will rewrite the previous values when you run the application. Make sure that values from other *.xafml files will not rewrite your values. To do this, review the *.xafml files that are loaded after your *.xafml file, including the Model.User.xafml, generated at runtime. For details on the layer structure of the Application Model, refer to the Application Model Basics topic.

Expanded Runtime Customization

WinForms runtime customization capabilities are the same as those provided by the Model Editor's ListView | Columns node. Refer to the Design-Time Customization section for details.

ASP.NET grid customization capabilities are slightly different from WinForms. You should use the header's context menu for hiding columns instead of dragging them. Also, manual column resizing is not available. Other functions are similar to the WinForms grid.

You can use the ResetViewSettings Action to undo all runtime customizations in the current List View.

Expanded Freezing Column Indices

If you have configured columns for a business class List View, and then added or removed public properties of the class, the column set will automatically change, and you may need to configure it again. However, you can "lock" customizations by setting the ListViewView node's FreezeColumnIndices property to True. In this case, the current state of column indexes is copied to the model differences, and so any changes on previous layers will be ignored. Columns that are subsequently generated will be hidden by default. Setting the FreezeColumnIndices property back to False will reset column configuration to the generated configuration by default.

Expanded See Also

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