ComponentOne Input for WinForms
Using the C1Input Controls / Handling NULL and Empty Values / Displaying NULL and Empty Values
In This Topic
    Displaying NULL and Empty Values
    In This Topic

    When a control is not in edit mode or is read-only, null values are displayed according to the NullText property (which can be overridden in DisplayFormat). If the property EmptyAsNull is set to True (default: False), empty strings are also displayed with the same NullText string. The EmptyAsNull property can also be overridden in EmptyAsNull. In edit mode, the NullText and EmptyAsNull properties of the EditFormat object take effect, instead of those of DisplayFormat.

    In edit mode with an active EditMask, the null value and the empty string are shown as an empty mask with literals in their places and prompt characters filling the rest.

    When editing a date-time value with the DateTimeInput property set to True, the null value is represented by an empty control. When the user starts editing with a keystroke or mouse click, the control immediately turns to a non-null value, namely, to the last non-null value assigned to the control or to today’s date.

    In programmatic formatting (FormatType set to UseEvent), the Formatting event is only called for non-null values.

    See Also