ComponentOne True DBInput Pro 8.0
InvalidValue Event (TDBDate)

 

Reference> TDBDate Control> TDBDate Control Events> InvalidValue Event (TDBDate)

InvalidValue Event (TDBDate)

The InvalidValue event occurs if the user tries to move the focus away from the control, when the entered value is invalid; it cannot be converted and recognized as a valid value.

Syntax

control_InvalidValue (Restore As Boolean)

Arguments

restore is a Boolean value that determines whether to restore the value when moving the focus  away from the control.

The possible values for restore are as follows:

True - Restores the old valid value. (Default)

False - Clears the content in the control.

Remarks

If the restore argument is set to True (default), the underlying value will be restored to the old value which when the control received the focus. If set to False, the control will be cleared, setting its value to Null. However, if the focus is set back to control, the restore argument will be ignored, and the control will display the invalid value just as it was with its old selection setting. If you want to modify the underlying value, you must set the Value, Number, or Text property.

When modifying date values by changing the Value, Number, or the Text property with an invalid value, this will cause an invalid value error to occur. No events are fired in this case.

When binding the control to a data source, if the retrieved value is an invalid value, the DBError event will fire, returning an error code - 0.

See Also

Value Property (TDBDate)

Value Property (TDBNumLite)

Value Property (TDBTime)

Number Property (TDBDate)

Text Property (TDBDate)

Text Property (TDBNumLite)

Text Property (TDBTime)

MaxDate Property (TDBDate)

MinDate Property (TDBDate)

DBError Event (TDBDate)

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback