A newer version of this page is available. Switch to the current version.

LayoutView.CustomFieldCaptionImage Event

Allows you to dynamically display images in field captions.

Namespace: DevExpress.XtraGrid.Views.Layout

Assembly: DevExpress.XtraGrid.v19.1.dll

Declaration

[DXCategory("Appearance")]
public event LayoutViewFieldCaptionImageEventHandler CustomFieldCaptionImage
<DXCategory("Appearance")>
Public Event CustomFieldCaptionImage As LayoutViewFieldCaptionImageEventHandler

Event Data

The CustomFieldCaptionImage event's data class is LayoutViewFieldCaptionImageEventArgs. The following properties provide information specific to this event:

Property Description
Column Gets or sets the column object that identifes the currently processed card field.
Image Gets or sets the image to be displayed within an element. Inherited from CardCaptionImageEventArgs.
ImageAlignment Gets or sets the alignment of the image within the field's caption.
ImageIndex Gets or sets the index of the image to be displayed within a visual element. Inherited from CardCaptionImageEventArgs.
ImageList Gets or sets the source collection of images. Inherited from CardCaptionImageEventArgs.
ImageToTextDistance Gets or sets the distance between the field's label and image.
RowHandle Gets the handle of the processed card. Inherited from CardCaptionImageEventArgs.

Remarks

Field captions can display small images, which can be assigned via a column's Image and ImageIndex properties, or via the CustomFieldCaptionImage event.

If a specific image must be displayed in a field caption in all cards, regardless of the field's or the card's state, use the field's LayoutViewColumn.ImageIndex or LayoutViewField.Image (LayoutControlItem.Image) property. See the LayoutViewColumn.ImageIndex topic to learn more.

If an image must be displayed in a field caption dynamically, depending on some conditions or the field's or card's state, handle the CustomFieldCaptionImage event to provide the image. The event fires for each card and field when a card is about to be displayed on-screen. Use the event's parameters to supply images to specific fields.

See Also