Back to Devexpress

FormatType Enum

corelibraries-devexpress-dot-utils-c4f49477.md

latest4.0 KB
Original Source

FormatType Enum

Enumerates values for the FormatInfo.FormatType property.

Namespace : DevExpress.Utils

Assembly : DevExpress.Data.v25.2.dll

NuGet Package : DevExpress.Data

Declaration

csharp
[ResourceFinder(typeof(ResFinder))]
public enum FormatType
vb
<ResourceFinder(GetType(ResFinder))>
Public Enum FormatType

Members

NameDescription
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.

|

The following properties accept/return FormatType values:

LibraryRelated API Members
Cross-Platform Class LibraryCustomExportCellEventArgsBase.FormatType
FormatInfo.FormatType
XlFormattingObject.FormatType
WinForms ControlsLookUpColumnInfo.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

Format

FormatType

Formatting Values

DevExpress.Utils Namespace