RealGrid2 API
Interface
ColumnSummary

ColumnSummary

Base classes such as ColumnFooter, ColumnHeaderSummary

Signature:

export interface ColumnSummary extends ColumnObject

Extends: ColumnObject

Remarks

All properties of ColumnSummary can only be called by subclasses that inherit it.

[Superclass]

ColumnObject

[subclass]

ColumnFooter

ColumnHeaderSummary

Events

PropertyTypeDescription
styleCallbackCellStyleCallbackCallbacks for styling
valueCallbackColumnSummaryCallback<T>Callback used when the user specifies the value displayed on the screen

Properties

PropertyTypeDescription
booleanFormatstringFormat displayed when the value is of type Boolean
datetimeFormatstring

Format displayed when the value is in date format

Refer to Custom Datetime Format

| excelFormat | string |

Format output when exporting to Excel

Enter the format code used in Excel's 'Cell Format > Custom' as a string

Structure: [Positive];[Negative];[0];[Text]

| | exportStyleName | string | Style name to be applied when exporting to Excel | | expression | string | expression | | index | number | | | numberFormat | string | Format displayed when the value is in numeric format | | prefix | string | Text to be prepended | | styleName | string | style class name | | suffix | string | Text to be added after | | summaryIndex | number | sequence number of summary | | templateCallback | RealizeSummaryCallback<T> | Used to replace and display a specific string in ColumnObject.template | | templateEvents | SummaryTemplateEvent<T> | SummaryTemplateEvent<T>[] | Used when setting events on elements added with ColumnObject.template | | text | string | Text displayed on screen | | textFormat | string | When the value is in text format, Convert Format | | value | any | Used when getting the result of ColumnSummary.expression or ColumnSummary.valueCallback | | zeroText | string | Sets the string to be printed by replacing the value when the result of expression is the number 0. |

Events Desc

styleCallback

Callbacks for styling

Type - CellStyleCallback

Remarks:

See CellStyleCallback


valueCallback

Callback used when the user specifies the value displayed on the screen

Type - ColumnSummaryCallback<T>

Remarks:

If valueCallback is specified, text/expression is ignored.


Properties Desc

booleanFormat

Format displayed 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

Format displayed when the value is in date format

See Custom Datetime Format

Type - string


excelFormat

Format output when exporting Excel

Enter the format code used in Excel's 'Cell Formatting > Custom' as a string

Structure: [Positive];[Negative];[0];[Text]

Type - string

Remarks:

For numbers, you can specify them as follows:

  1. Thousands separator comma and decimal point excelFormat: '#,##0.00'

  2. Display negative numbers in red and zeros with a hyphen (-) excelFormat: '#,##0;[Red]-#,##0;-"'

For more details, refer to number-format.com (opens in a new tab)


exportStyleName

Style name to be applied when exporting to Excel

Type - string


expression

expression

Type - string

Remarks:

If expression is specified, text is ignored.


index

Warning: This API is now obsolete.

Replaced with summaryIndex

Type - number


numberFormat

Format displayed when the value is in numeric format

Type - string


prefix

text to be added before

Type - string


styleName

style class name

Type - string


suffix

text to be added after

Type - string


summaryIndex

Sequence of summary

Type - number

Remarks:

Sequence number if there are multiple GridColumn.footer or GridColumn.headerSummary.


templateCallback

Used to replace and display a specific string in ColumnObject.template

Type - RealizeSummaryCallback

Remarks:

Called if the string is not in values.


templateEvents

Used when setting an event to an element added with ColumnObject.template

Type - SummaryTemplateEvent | SummaryTemplateEvent[]


text

Text displayed on screen

Type - string


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'


value

Used when getting the result of ColumnSummary.expression or ColumnSummary.valueCallback

Type - any

Remarks:

This is a read-only value.


zeroText

Sets the string to be printed by replacing the value when the result of expression is the number 0.

Type - string