RealGrid2 API
Interface
FormatOptions

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

PropertyTypeDescription
booleanFormatstringWhen the value is of type Boolean, the conversion format
datetimeFormatstringWhen the value is in date format, convert format
numberFormatstringWhen the value is in numeric format, the conversion format
textFormatstringWhen 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'