Skip to main content

RowCellCustomDrawEventArgs.DisplayText Property

Gets or sets the painted element’s display text.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v24.1.dll

NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

public string DisplayText { get; set; }

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.

The following code snippets (auto-collected from DevExpress Examples) contain references to the DisplayText property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also