GridColumn
Column Information Model
Signature:
export interface GridColumnRemarks
In practice, GridColumn's descendant classes DataColumn or SeriesColumn are used.
[subclass]
Properties
| Property | Type | Description |
|---|---|---|
| checked | boolean | Checked or not |
| displayIndex | number | Indicates the display order of the column within the column group to which the column belongs. |
| displayText | string | Display text of the column within the column group to which the column belongs |
| displayWidth | number | Display width of the column within the column group to which the column belongs |
| fillWidth | number | Width within column group |
| footer | ColumnFooter | Column footer (first item if there are multiple) |
| footers | ColumnFooterCollection | Column Footer Collection Object |
| groupFooter | ColumnSummary | Group footer (first item if multiple) |
| groupFooters | ColumnFooterCollection | Group footer collection object. |
| header | ColumnHeader | column header |
| headerSummaries | ColumnHeaderSummaryCollection | Header Summary collection object. |
| headerSummary | ColumnHeaderSummary | Header Summary (first item if multiple) |
| indeterminate | boolean | Whether indeterminate status |
| index | number | order |
| layout | CellLayoutColumnItem | Layout Item Object |
| movable | boolean | Whether columns can be moved |
| name | string | column name |
| resizable | boolean | Whether column width is adjustable |
| visible | boolean | Column visibility |
| width | number | column width |
Methods
| Method | Type | Description |
|---|---|---|
| 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"}
]);