setTextFromDecimal(dec: Decimal);
The setTextFromDecimal method sets the text from the textUser property of a JadeEditMask control to a
The string contains the number of decimal places specified by the mask property. If the mask property is null (""), the number of decimal places specified in the dec parameter is retained. (Note that an exception is raised if the resulting string does not conform to the data format specified by the mask property value.)
The setTextFromDecimal method of a TextBox control sets the text property to a
If the text box is numeric (that is, the dataType property value of DataType_Numeric (1), DataType_SignedNumeric (2), or DataType_Currency (3)) and the value of decimals property is positive, the number of decimals places displayed is equal to the decimals property value.
If the text box is not numeric or the value of the decimals property is less than zero (0), the number of decimal places specified in the dec parameter is retained. (Note that an exception is raised if the resulting string exceeds the maxLength property value of the text box.)
When the
When the
A numeric JadeEditMask control expects the negative sign, decimal place, and separator characters to be in the form defined for the locale under which the control is running. A numeric TextBox control expects the negative sign and decimal place characters to be in the form defined for the locale under which the user is running. This applies when accessing the text or textUser properties and when the user enters data. Setting decimal text by using the setTextFromDecimal method converts the numeric into the appropriate string for that locale. Retrieving the
The position of a negative sign indicated by the locale is honored by a leading or trailing numeric in the JadeEditMask or TextBox control. However, locales that specify a negative value expressed by parentheses (for example, (123)) are treated as a leading dash symbol (-). In addition, locales that have a leading or trailing space associated with a negative sign are treated as the equivalent format without the space (for example, - 123 will be ‑123 and 123 - will be 123‑).