Skip to main content

GridColumn.DisplayFormat Property

Provides access to the object specifying the formatting applied to column values.

Namespace: DevExpress.XtraGrid.Columns

Assembly: DevExpress.XtraGrid.v22.2.dll

NuGet Package: DevExpress.Win.Grid


public FormatInfo DisplayFormat { get; }

Property Value

Type Description

A FormatInfo object that specifies format settings for column values.


Settings provided by this property allow you to format column values in display mode and when the grid is exported/printed.

You can implement cell formatting by using the GridColumn.DisplayFormat.Format property. String formatting implemented in this way is not supported when a grid’s edit values (not display text) are exported to XLS format. To specify the cell export mode, use the RepositoryItem.ExportMode and/or XlExportOptionsBase.TextExportMode properties.


Changing the DisplayFormat.FormatType property automatically resets the DisplayFormat.FormatString property. Thus, it is recommended to set DisplayFormat.FormatType prior to DisplayFormat.FormatString.

Please refer to the following topic for additional information: Formatting Cell Values.


The following code shows how to format column values using the standard format strings. Values in the colPayment column are formatted as a currency amount, values in the colPurchaseDate column are formatted using the Long Date Pattern.

The result is shown below:

Format - StandardStrings

using DevExpress.Utils;
// ...
colPayment.DisplayFormat.FormatType = FormatType.Numeric;
colPayment.DisplayFormat.FormatString = "c2";
colPurchaseDate.DisplayFormat.FormatType = FormatType.DateTime;
colPurchaseDate.DisplayFormat.FormatString = "D";
See Also