ColumnStyleObject
One of the style models that must be returned when changing the cell style with CellStyleCallback
Signature:
export interface ColumnStyleObject
Remarks
Used in GridBase.setCellStyleCallback() or ValueColumn.styleCallback.
Example
// Apply per column
let column = gridView.columnByName('Company');
const f = function (grid, cell) {
return {
styleName: 'custom-column'
}
}
column.styleCallback = f;
// Apply to each data cell
gridView.setCellStyleCallback(f);
Properties
Property | Type | Description |
---|---|---|
booleanFormat | string | When the value is of type Boolean, Format |
button | CellButton | Specifies the type of CellButton to be displayed in the cell. |
buttonWidth | number | Change the width of CellButton. |
cellProtectProps | CellProtectProperties | When exporting to Excel, set to lock cells or hide formulas. |
datetimeFormat | string | When the value is in date format, Format |
editable | boolean | Editable with editor |
editor | CellEditor | ConfigObject | Editor |
excelFormat | string | Specify the format when exporting to Excel. |
exportStyleName | string | Style name to be applied when exported to Excel |
numberFormat | string | When the value is in numeric format, Format |
prefix | string | Text to be displayed in front of the value |
readOnly | boolean | Modification possible or prohibited |
renderer | CellRenderer | ConfigObject | renderer |
style | Partial<CSSStyleDeclaration> | Used when specifying inline-style. |
styleName | string | style name |
suffix | string | Text to be added to the end of the value |
text | string | text to be displayed in the cell instead of data |
textFormat | string | When the value is in text format, Format |
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.
If not specified, the value set in the data field is used.
Separated with a colon (:) or semicolon (;), the left side is false
, and the right side is true
.
Example) 'Nub: Yub'
button
Specifies the type of CellButton to be displayed in the cell.
Type
- CellButton
buttonWidth
Change the width of CellButton.
Type
- number
cellProtectProps
When exporting to Excel, set to lock cells or hide formulas.
Type
- CellProtectProperties
Remarks:
If not specified, DataColumn.cellProtectProps is applied. Use with GridExportOptions.sheetProtect.
datetimeFormat
Format when the value is in date format
Type
- string
editable
Can be edited with editor
Type
- boolean
editor
editor
Type
- CellEditor | ConfigObject
excelFormat
Specify the format when exporting to Excel.
Type
- string
Remarks:
If not specified, DataColumn.excelFormat or format according to dataType is applied.
exportStyleName
Style name to be applied when exported to Excel
Type
- string
numberFormat
Format when the value is in numeric format
Type
- string
prefix
Text to display in front of the value
Type
- string
readOnly
Editable or prohibited?
Type
- boolean
renderer
renderer
Type
- CellRenderer | ConfigObject
style
Used when specifying inline-style.
Type
- Partial<CSSStyleDeclaration>
Remarks:
Specifies properties to add to the style of td
.
styleName
style name
Type
- string
suffix
Text to be added to the end of the value
Type
- string
text
데이터 대신 셀에 표시될 text
Type
- string
Remarks:
DataColumn.lookupDisplay 또는 DataColumn.displayCallback 보다 먼저 적용된다.
textFormat
Formatting when the value is in text format
Type
- string