FormatOptions
Setting model for conversion format of data field values
Signature:
export interface FormatOptions
Remarks
When setting it as an option in Grid, you only need to enter the necessary information.
Example
grid.setFormatOptions({booleanFormat: 'wrong:correct'});
Properties
Property | Type | Description |
---|---|---|
booleanFormat | string | When the value is of type Boolean, the conversion format |
datetimeFormat | string | When the value is in date format, convert format |
numberFormat | string | When the value is in numeric format, the conversion format |
textFormat | string | When the value is in text format, Convert Format |
Properties Desc
booleanFormat
Conversion format when the value is of type Boolean
Type
- string
Remarks:
Separated with a colon (:) or semicolon (;), the left side is false
, and the right side is true
.
Example) 'Nub: Yub'
datetimeFormat
Conversion format when the value is in date format
Type
- string
Remarks:
Example) 'yy-M-dd'
numberFormat
Conversion format when the value is of numeric type
Type
- string
Remarks:
Example) ' #,##0.### '
textFormat
Conversion format when the value is in text format
Type
- string
Remarks:
Separate with a semicolon (;) and specify the same type as the first parameter of String.prototype.replace on the left and the second parameter on the right. Example) '([A-Za-z]*); Mr\. \$1'