Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Formatting Approaches

DevExpress data-aware controls provide a complete set of options to format display values.

#Standard or Custom Format Specifiers

Allows you format numeric and date-time values according to predefined or custom patterns. For instance, a numeric value can be represented as a currency amount or a hexadecimal value, using scientific notation, etc. A date-time value can be represented in the standard Short Date. Long Date or Full Date-Time form.

Standard Specifiers Sample

#Composite Formatting

Extends the previous one, as it allows you to format numeric and date-time values using one of the standard or custom format specifiers, and allows you to add any custom text to the resultant string.

Composite Formatting Sample

#Event-Based Formatting

DevExpress data-aware controls provide events that allow you to manually specify the display text. For instance, the DXGrid provides the GridControl.CustomColumnDisplayText event allowing you to provide custom text for any data cell. Editor controls shipped within the DXEditors Library provide the BaseEdit.CustomDisplayText event, which enables you to display a custom string within the editor.

#Using Mask Settings

Our WPF Data Editors provide the masked input features. When using masks, turn on TextEdit.MaskUseAsDisplayFormat and use mask settings to format display values.