RealGrid2 API
Interface
GridColumn

GridColumn

Column Information Model

Signature:

export interface GridColumn

Remarks

In practice, GridColumn's descendant classes DataColumn or SeriesColumn are used.

[subclass]

ValueColumn

Properties

PropertyTypeDescription
checkedbooleanChecked or not
displayIndexnumberIndicates the display order of the column within the column group to which the column belongs.
displayTextstringDisplay text of the column within the column group to which the column belongs
displayWidthnumberDisplay width of the column within the column group to which the column belongs
fillWidthnumberWidth within column group
footerColumnFooterColumn footer (first item if there are multiple)
footersColumnFooterCollectionColumn Footer Collection Object
groupFooterColumnSummaryGroup footer (first item if multiple)
groupFootersColumnFooterCollectionGroup footer collection object.
headerColumnHeadercolumn header
headerSummariesColumnHeaderSummaryCollectionHeader Summary collection object.
headerSummaryColumnHeaderSummaryHeader Summary (first item if multiple)
indeterminatebooleanWhether indeterminate status
indexnumberorder
layoutCellLayoutColumnItemLayout Item Object
movablebooleanWhether columns can be moved
namestringcolumn name
resizablebooleanWhether column width is adjustable
visiblebooleanColumn visibility
widthnumbercolumn width

Methods

MethodTypeDescription
getFooter(index)getFooter?(index: number): ColumnFooter;Gets the column footer.
getHeaderSummary(index)getHeaderSummary?(index: number): ColumnHeaderSummary;Get the column headerSummary.
setFooters(footers)setFooters?(footers: any[]): void;Column footer settings
setGroupFooters(footers)setGroupFooters?(footers: ColumnSummary[]): void;Column groupFooter settings
setHeaderSummaries(summaries)setHeaderSummaries?(summaries: any[]): void;Set column HeaderSummary

Properties Desc

checked

Checked or not

Type - boolean

Remarks:

If column.header.checkLocation is not none, the check status is displayed on the screen.


displayIndex

Indicates the display order of the column within the column group to which the column belongs.

Type - number

Remarks:

This is a read-only value.


displayText

The display text of the column within the column group to which the column belongs.

Type - string

Remarks:

This is a read-only value.


displayWidth

Display width of the column within the column group to which the column belongs

Type - number

Remarks:

This is a read-only value.


fillWidth

Width within column group

Type - number

Remarks:

It is specified as a ratio.


footer

Column footer (first item if there are multiple)

Type - ColumnFooter


footers

Column Footer Collection Object

Type - ColumnFooterCollection


groupFooter

Group footer (first item if multiple)

Type - ColumnSummary


groupFooters

Group footer collection object.

Type - ColumnFooterCollection


header

column header

Type - ColumnHeader


headerSummaries

Header Summary collection object.

Type - ColumnHeaderSummaryCollection


headerSummary

Header Summary (first item if multiple)

Type - ColumnHeaderSummary



indeterminate

Indeterminate status

Type - boolean

index

order

Type - number


layout

Layout item object

Type - CellLayoutColumnItem

Remarks:

You can set it by accessing its properties.

Example:

column.layout.spanCallback = function (grid, layout, itemIndex) {
 var value = grid.getValue(itemIndex, layout.column.name);
 if (value) {
 return value[0] === "B" ? 2: value[0] === "F" ? 3:1;
 }
};

movable

Is it possible to move the column?

Type - boolean


name

column name

Type - string


resizable

Is column width adjustable?

Type - boolean


visible

Column visibility

Type - boolean

Remarks:

If it is false, it is not displayed even if the visibility of the connected layout is true. In other words, both layout and column visibility must be true.


width

column width

Type - number


Method Desc

getFooter

Gets the column footer.

[Parameter List]

index - number

turn

[Return Value] - ColumnFooter


getHeaderSummary

Get the column headerSummary.

[Parameter List]

index - number

turn

[Return Value] - ColumnHeaderSummary


setFooters

Column footer settings

[Parameter List]

footers - any[]

Footer setting information arrangement

[Return Value] - void

Remarks:

If the footer has multiple lines, set the style and expression.

Example:

gridView.setFooters([{styleName:"footer-style1"}, {styleName:"footer-style2"}]);
gridView.columnByName("column").setFooters([
 {styleName:"footer-cell-style1", expression: "sum"},
 {styleName:"footer-cell-style2", expression: "max"}
]);

setGroupFooters

Column groupFooter settings

[Parameter List]

footers - ColumnSummary[]

footer configuration information arrangement

[Return Value] - void

Remarks:

If groupFooter has multiple lines, set the style and expression.

Example:

gridView.rowGroup.setFooters([{styleName:"footer-style1"}, {styleName:"footer-style2"}]);
gridView.columnByName("column").setGroupFooters([
 {styleName:"footer-cell-style1", expression: "sum"},
 {styleName:"footer-cell-style2", expression: "max"}
]);

setHeaderSummaries

Column HeaderSummary settings

[Parameter List]

summaries - any[]

headerSummary configuration information array

[Return Value] - void

Remarks:

If headerSummary has multiple lines, set the style and expression.

Example:

gridView.setHeaderSummaries([{styleName:"summary-style1"}, {styleName:"summary-style2"}]);
gridView.columnByName("column").setHeaderSummaries([
 {styleName:"summary-cell-style1", expression: "sum"},
 {styleName:"summary-cell-style2", expression: "max"}
]);