Formatting and Null Value Management
Display Value Formatting
The data editors that ship within the DXEditors Library provide you with a complete set of options for display value formatting.
- 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.
- 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 add any custom text to the resultant string.
- Formatting via Display Value Converter
Allows you to handle any value type and provide any desired output.
- Event-Based Formatting
Data editors provide the CustomDisplayText event allowing you to display a custom string within the editor.
- Using Mask Settings
When using masks, you may turn on MaskUseAsDisplayFormat and use mask settings to format display values.

Null Value Management
A very common requirement for data editing is the ability to handle null values.
The DXEditors Library provides an out-of-the-box solution for such situations. An editor's AllowNullInput option specifies whether the CTRL+0 and CTRL+DEL shortcuts can reset the edit value to null. In addition to null and DBNull values, you can specify one more (custom) null value for an editor via the NullValue property.
Editors that hold null values can optionally display a custom string so that end-users can distinguish between empty strings and actual null values.
If you require the display of a null value text for empty strings, the ShowNullTextForEmptyValue option can be utilized.

|