dataType

Type: Integer

Availability: Read or write at any time

The dataType property of a TextBox control contains the type of data that can be entered in the text box by the user.

The settings for the dataType property are listed in the following table.

TextBox Class Constant Value Description
DataType_AlphaNumeric 0 Any character that can be entered (the default).
DataType_Numeric 1 Combined with the decimals property, this property ensures that the user can enter a valid decimal value only.
DataType_SignedNumeric 2 Same as DataType_Numeric (1), except that a leading negative sign is also permitted.
DataType_Currency 3 The currency text is in the form defined by the currency format of the locale.
    By default, the decimals property is set to -1, indicating that the number of decimal places for currency defined by the current locale is used. To manually control how many decimal places are allowed, set the decimals property to a value other than -1. The text can include the currency symbol, negative sign, thousands separators, and decimal places; for example, $123,456.34.
DataType_ShortDate 4 The date text is in the form defined by the short date format of the locale. For example, under English (New Zealand), the default format is d/MM/yyyy (for example, 7/08/2010).
    Note that when altering the text, deleting characters that would make the date invalid is not permitted; for example, deleting the day 7 or a / character. To make such changes, select the character to be replaced and then enter the new value, or delete the date from the right up to the required position. Incomplete dates are allowed, where the date text entered so far is valid.
DataType_LongDate 5 The date text is in the form defined for the locale’s long date format. For example, under English (New Zealand), the default format is dddd, d MMMM yyyy (for example, Sunday, 7 March 2010).
    Note that when altering the text, deleting characters that would make the date invalid is not permitted; for example, deleting the day 7 or a / character. To make such changes, select the character to be replaced and then enter the new value, or delete the date from the right up to the required position. Incomplete dates are allowed, where the date text entered so far is valid.
    In addition, when the day name is displayed, that day must match the day for the date. To alter the date, it will most likely require the day name to be removed before the date can be achieved. Note that the month names can be entered in the full or short format.
DataType_Time 6 The time text is in the form defined for the locale’s long time format. For example, under English (New Zealand), the default format is h:mm:ss tt (for example, 5:29:02 p.m.).
    Note that when altering the text, deleting characters that would make the date invalid is not permitted; for example, deleting the hour 7 or a : character. To make such changes, select the character to be replaced and then enter the new value, or delete the date from the right up to the required position. Incomplete times are allowed, where the time text entered so far is valid.

When the EnhancedLocaleSupport parameter in the [JadeEnvironment] section of the JADE initialization file on the database node is not defined or it is set to false, no local client overrides are used.

The numeric text is validated as each character is entered. If the result of the assignment would result in an invalid numeric as defined by the dataType and decimals properties, the entered character is rejected.

Setting the dataType property for a text box control to a numeric type is rejected if the current text in the text box does not conform to the rules defined by the current dataType, decimals, and maxLength properties.

If the case property is set to any value other than the default value of Case_None (0), the dataType property is set to the default value of DataType_AlphaNumeric (0) and the decimals property is set to zero (0); that is, no exception is raised.