Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+
Row

Cell.DisplayText Property

Gets the string that specifies the formatted cell value as it is displayed.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v19.1.Core.dll

Declaration

string DisplayText { get; }

Property Value

Type Description
String

A String value that specifies the cell’s display text.

Remarks

A CellValue object specifies a piece of data contained in a cell - cell value. It is accessed via the Range.Value property. A cell can contain data of the numeric, text, Boolean or error type. You can apply different number formats to display a cell’s numeric data in the appropriate view. For example, a numeric value can be displayed as a decimal number, a percentage, currency value, etc. Also, a number contained in a cell can be formatted as a date and time value (see the Dates and Times in Cells document for details). The DisplayText property returns the string that specifies how the formatted value is displayed in the cell.

Cell Value Number Format Cell Display Value
cell.Value = 41253 cell.NumberFormat = “$#,##0.00” cell.DisplayText = “$41,253.00”
cell.Value = 41253 cell.NumberFormat = “d-mmm-yy” cell.DisplayText = “10-Dec-12”

The Cell.IsDisplayedAsDateTime property indicates whether the cell value is formatted as date and time.

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