Formatting Values
- 2 minutes to read
Most DevExpress .NET WinForms controls let you format values before they are displayed onscreen. For instance, you can format a numeric value as a currency, display a date/time value in one of the standard forms depending upon the culture (6/17/2005; Friday, June 17, 2006), etc.
DevExpress controls use a standard formatting mechanism to format values as described in Microsoft documentation. The current document shows how to invoke this formatting mechanism for DevExpress controls.
Specific controls (XtraGrid, XtraPivotGrid and editors in the XtraEditors Library) also provide events that allow you to dynamically format displayed text. For editors, it is possible to use masks to enable formatted input; the masks can also be used to format values even when no editing is active.
Concepts
- Formatting Approaches
- Members that Support the Formatting Mechanism
- Format Specifiers
- Composite Formatting
- Custom Formatting
Task-Based Help
- How to: Format Date-Time Values Using the LongDate Pattern
- How to: Format Date-Time Values Using a Custom Format Pattern
- How to: Format a Numeric Value according to its Sign
- How to: Add Custom Text to a Formatted String
- How to: Create a Custom Formatter to Change the Case of String Values
- How to: Create a Custom Formatter to Represent Decimal Values in Binary