RealGrid2 API
Interface
DataOutputOptions

DataOutputOptions

A configuration model for how to return data when outputting

Signature:

export interface DataOutputOptions

Remarks

Specifies the conversion format for datetime, boolean, and number fields.

Used in LocalDataProvider.getOutputRow(), LocalDataProvider.getOutputRows().

Used in LocalTreeDataProvider.getOutputRow(), LocalTreeDataProvider.getOutputRows().

Example

let opt = {
      nullText: 'empty value'
}
let row = dataProvider.getOutputRow(opt, 4);

Events

PropertyTypeDescription
booleanCallbackBooleanOutputCallbackCallback to be performed when converting boolean field
datetimeCallbackDatetimeOutputCallbackCallback to be performed when converting datetime field
numberCallbackNumberOutputCallbackCallback to be performed when converting number field

Properties

PropertyTypeDescription
booleanFormatstringWhen the value is of type Boolean, Format
datetimeFormatstringWhen the value is in date format, Format
nanTextstringThe value expressed when the value of the number field is null
nullDateTextstringValue expressed when the value of the DateTime field is null
nullTextstringValue expressed when the value of the text field is null
numberFormatstringWhen the value is in numeric format, Format
rowStatebooleanIf true, the row status value is added to the return value.

Events Desc

booleanCallback

Callback to be performed when converting a boolean field

Type - BooleanOutputCallback

Remarks:

The format is BooleanOutputCallback.


datetimeCallback

Callback to be performed when converting a datetime field

Type - DatetimeOutputCallback

Remarks:

The format is DatetimeOutputCallback.


numberCallback

Callback to be performed when converting the number field

Type - NumberOutputCallback

Remarks:

The format is NumberOutputCallback.


Properties Desc

booleanFormat

Formatting when the value is of type Boolean

Type - string

Remarks:

If this value is specified, it is used as a conversion format when outputting the value of a boolean field.

Separated with a colon (:) or semicolon (;), the left side is false, and the right side is true.

Example) 'Nub: Yub'


datetimeFormat

Format when the value is in date format

Type - string

Remarks:

If this value is specified, it is used as a conversion format when outputting the value of a datetime field.

To output in standard time zone, enter yyyy-MM-dd HH:mm:ssZ.

To output in a specific time zone, enter yyyy-MM-dd HH:mm:ss+ or yyyy-MM-dd HH:mm:ss+08:00.

Example) 'yyyy-MM-dd'


nanText

Value expressed when the value of the number field is null

Type - string


nullDateText

Value expressed when the value of the DateTime field is null

Type - string


nullText

Value displayed when the value of the text field is null

Type - string


numberFormat

Format when the value is in numeric format

Type - string

Remarks:

Example) ' #,##0.### '


rowState

If true, the row status value is added to the return value.

Type - boolean