RowCellCustomDrawEventArgs.DisplayText Property

Gets or sets the painted element's display text.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v20.1.dll

Declaration

public string DisplayText { get; set; }
Public Property DisplayText As String

Property Value

Type Description
String

A string value representing the element's display text.

Remarks

Initially, the DisplayText property value contains the element's default text representation.

If painting a data cell (via the GridView.CustomDrawCell, CardView.CustomDrawCardFieldValue and LayoutView.CustomDrawCardFieldValue events), the DisplayText property returns the cell's display text formatted as specified by the column's GridColumn.DisplayFormat property.

If painting a card field (via the CardView.CustomDrawCardField event) and card field caption (via the CardView.CustomDrawCardFieldCaption and LayoutView.CustomDrawCardFieldCaption events), the DisplayText property initially contains the card field caption.

The DisplayText property can be used in two ways:

  • read the property value and manually paint the default text;
  • change the DisplayText property value and leave the event's CustomDrawEventArgs.Handled parameter set to false. In this case, the element will be painted using the default mechanism but with the modified text.
See Also