Skip to main content
A newer version of this page is available. .

FormatType Enum

Enumerates values for the FormatInfo.FormatType property.

Namespace: DevExpress.Utils

Assembly: DevExpress.Data.v20.1.dll

NuGet Packages: DevExpress.Data, DevExpress.WindowsDesktop.Data

Declaration

[ResourceFinder(typeof(ResFinder))]
public enum FormatType

Members

Name Description
None

No formatting is performed.

Setting the FormatInfo.FormatType property to None clears the FormatInfo.FormatString property and sets the FormatInfo.Format object to null.

Numeric

Specifies that values should be formatted as numbers.

Setting FormatInfo.FormatType to Numeric assigns the static System.Globalization.NumberFormatInfo.CurrentInfo format provider to the FormatInfo.Format property. This defines the format provider for the current culture.

Also FormatInfo.FormatString is set to an empty string.

DateTime

Specifies that values should be formatted as the DateTime type.

Setting FormatInfo.FormatType to DateTime assigns the static CurrentInfo format provider to the FormatInfo.Format property. This defines the format provider for the current culture. Also FormatInfo.FormatString is set to “d” (short date pattern).

Custom

Use Custom to format string values.

Use Custom when assigning a custom IFormatProvider to the FormatInfo.Format property.

Setting FormatInfo.FormatType to Custom does not change the FormatInfo.Format and FormatInfo.FormatString property values.

Related API Members

The following properties accept/return FormatType values:

Library Related API Members
Cross-Platform Class Library CustomExportCellEventArgsBase.FormatType
FormatInfo.FormatType
XlFormattingObject.FormatType
WinForms Controls LookUpColumnInfo.FormatType

Remarks

The FormatType type enumerates values for the FormatInfo.FormatType property.
To change formatting, you need to specify format providers via the FormatInfo.Format property.

See Formatting Values, to learn more.

See Also