Skip to main content

Preview Section

  • 2 minutes to read

Microsoft Outlook style preview sections allow you to display a memo field’s content or custom memo information for records in an elegant manner. Such sections are displayed above or under each data row and their width matches total column width.

Feature

Related Members

Visibility

The View’s Preview.Visible property. Note that the preview section is not shown until the preview column is specified (see below).

Content

The preview section displays values provided by a specific column (also called preview column). You can specify the preview column either via the View’s Preview.Column property or the column IsPreview property. This column is automatically excluded from the list of visible columns – its Visible property is set to False.

Handle the preview column’s OnGetDisplayText event to customize the preview text.

Appearance

The common style for preview sections in a View is set by the View’s Styles.Preview property. You can also provide styles for individual preview sections by handling the View’s Styles.OnGetPreviewStyle event.

The background bitmap for preview sections can be set via the View’s BackgroundBitmaps.Preview property.

Custom Draw

The View’s OnCustomDrawCell event. The event’s AViewInfo parameter is of the TcxGridPreviewCellViewInfo type if a preview section is about to be painted.

Layout

The View’s Preview.AutoHeight and Preview.MaxLineCount properties specify the height of preview sections. The Preview.LeftIndent and Preview.RightIndent properties set the horizontal indentation between the preview text and the View’s edges. Finally, the Preview.Place property specifies whether to display preview sections above or under the corresponding records.

See Also