Skip to main content
All docs
V24.1
.NET 6.0+

How to: Enable Row Preview Sections in a Grid List Editor

  • 2 minutes to read

Grid List Editors can display lengthy memo fields in Row Preview Sections. Use the PreviewColumnName property to enable this feature. This property allows you to select one of the columns from the Columns collection.

When the DataAccessMode property is DataView, a list view uses only visible columns to display data in the Row Preview Sections. To customize this behavior, use the CustomizeDisplayableProperties event.

The instructions below customize the Note List View. Follow these instructions to enable Row Preview Sections and populate them with values of the Note.Text property.

Note

To follow the steps below, you can use the MainDemo application installed as a part of the XAF package. The default location of the application is %PUBLIC%\Documents\DevExpress Demos 24.1\Components\XAF.

This application’s DemoTask List View initially displays Preview Sections populated with values of the DemoTask.Description property.

  1. In the Solution Explorer, go to the MainDemo.Module project and double-click the Model.DesignedDiffs.xafml file to open it in the Model Editor.

  2. Navigate to the Views | MySolution.Module.BusinessObjects | Note | Note_ListView node.

  3. Set the PreviewColumnName property to Text.

    PreviewColumnName property in the Model Application, DevExpress

  4. Navigate to the Views | MySolution.Module.BusinessObjects | Note | Note_ListView | Columns | Text node.

  5. Set the Index property to -1. This hides the Text column from a grid. So, the column values are only displayed in a Row Preview Section.

    A column's Index property in the Model Application, DevExpress

  6. Run the application. Navigate to the Note List View to see the preview section.

    Preview section in Note List View, DevExpress