ComponentOne True DBInput Pro 8.0
ValidateMode Property (TDBTime)

 

Reference> TDBTime Control> TDBTime Control Properties> ValidateMode Property (TDBTime)

ValidateMode Property (TDBTime)

The ValidateMode property provides higher performance and flexibility during data entry.

Syntax

TDBTime.ValidateMode= value

Read/Write at run time and design time.

Values

Design Time

Run Time

0 - Filter (Default)

dbiValidateTime

1 - None

dbiValidateTimeNone

Remarks

If set to 0-Filter, the data validation of values such as non-existing times (99:99:99) will be handled correctly, which reduces coding time and can eliminate time checking within your code. Automatic character filtering for allowable characters will be handled correctly as the user enters data. For example, when the input mask is set to 'hh:nn:ss am/pm, the user will not be able to enter time such as "13:00:00 am".

If set to 1-None, all fields will behave independently with absolutely no validation checking. The user will be able to input the full range within a field without influencing other fields

For example, if the format for the input mask is set to 'hh:nn:ss', the control allows you to enter a time such as '99:99:99', which can not normally exist as a Date type value. Note when entering these non-existing times, the InvalidInput event and the error beep will not be invoked.

The following table shows the valid range for the individual fields (1-None):

Format

Valid Range

hh

00 - 99

nn

00 - 99

ss

00 - 99

am/pm

am, pm

AMPM

Gozen, Gogo

In the 1-None mode, although the control allows you to enter time values without any validation, when moving the focus away, the control will still process the data validation in accordance with any other cases. The motive of this mode is to provide an option (solution) for those users that require smooth (free) inputting rather than the needs of data validation.

This property takes effect only when inputting within the control. After moving the focus away, the value will be validated and the events will be fired accordingly.

If the entered data is incomplete during input, such as 13:__:30 or an invalid data such as 99:99:99 AM ,with the ValidateMode set to 1-None, the Value and the Number property will both return Null. The Hour, Minute, Second properties will return -1 and the AMPM property a zero-length string.

Performing spin actions will cause values to carry on in any mode of the ValidateMode. Note that the valid ranges for the spin actions are equivalent to when entering data as the tables shown above.

See Also

Format Property (TDBTime)

EditMode Property (TDBTime)

Value Property (TDBTime)

Number Property (TDBTime)

Hour Property (TDBTime)

Minute Property (TDBTime)

Second Property (TDBTime)

AMPM Property (TDBTime)

InvalidInput Event (TDBTime)

 

 


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

Product Support Forum  |  Documentation Feedback