GridColumn<TData>
Represents a grid column
Type parameters
| Type parameter | Value |
|---|---|
TData | any |
Constructors
new GridColumn()
new GridColumn<
TData>(dart):GridColumn<TData>
Parameters
| Parameter | Type |
|---|---|
dart | any |
Returns
GridColumn<TData>
Source
Properties
| Property | Type |
|---|---|
dart | any |
Accessors
backColor
getbackColor():Color
Background column as a 4-byte ARGB number.
setbackColor(x):void
Parameters
| Parameter | Type |
|---|---|
x | Color |
Returns
Source
categoryColors
getcategoryColors():object
Custom colors for categories. Sample: https://public.datagrok.ai/js/samples/grid/category-colors
setcategoryColors(x):void
Parameters
| Parameter | Type |
|---|---|
x | object |
Returns
object
Source
cellType
getcellType():string
setcellType(x):void
Parameters
| Parameter | Type |
|---|---|
x | string |
Returns
string
Cell type.
Source
column
getcolumn():null|Column<TData,TData>
Returns
null | Column<TData, TData>
Corresponding table column, or null.
Source
contentCellStyle
getcontentCellStyle():GridCellStyle
Cell style used for rendering data cells
Returns
Source
editable
geteditable():boolean
Whether the column is editable.
seteditable(x):void
Parameters
| Parameter | Type |
|---|---|
x | boolean |
Returns
boolean
Source
format
getformat():string
Column format. Sample: https://public.datagrok.ai/js/samples/grid/html-markup-cells
setformat(x):void
Parameters
| Parameter | Type |
|---|---|
x | string |
Returns
string
Source
grid
getgrid():Grid
A Grid this column is associated with
Returns
Source
headerCellStyle
getheaderCellStyle():GridCellStyle
Cell style used for rendering header cells
Returns
Source
idx
getidx():number
Index of the column.
Returns
number
Source
isTextColorCoded
getisTextColorCoded():boolean
isTextColorCoded. Whether to apply color to the text or background.
setisTextColorCoded(x):void
Parameters
| Parameter | Type |
|---|---|
x | boolean |
Returns
boolean
Source
left
getleft():number
Left border (in pixels in the virtual viewport)
Returns
number
Source
name
getname():string
setname(x):void
Parameters
| Parameter | Type |
|---|---|
x | string |
Returns
string
Column name.
Source
onPrepareValueScript
getonPrepareValueScript():string
A script that returns cell value, using the "gridCell" parameter. See example: ApiSamples/grid/advanced/dynamic-value-retrieval.js
setonPrepareValueScript(x):void
Parameters
| Parameter | Type |
|---|---|
x | string |
Returns
string
Source
renderer
getrenderer():GridCellRenderer<any>
Grid cell renderer.
setrenderer(x):void
Parameters
| Parameter | Type |
|---|---|
x | GridCellRenderer<any> |
Returns
GridCellRenderer<any>
Source
right
getright():number
Right border (in pixels in the virtual viewport)
Returns
number
Source
selected
getselected():boolean
Whether the column is selected.
setselected(x):void
Parameters
| Parameter | Type |
|---|---|
x | boolean |
Returns
boolean
Source
settings
getsettings():any
Grid column settings.
setsettings(s):void
Parameters
| Parameter | Type |
|---|---|
s | any |
Returns
any
Source
tags
gettags():object
Use this field to keep arbitrary auxiliary data. It is serialized as JSON, so be careful. See also temp.
Returns
object
Source
temp
gettemp():object
Use this field to keep auxiliary data. It is not serialized. See also tags.
Returns
object
Source
tooltipColumns
gettooltipColumns():string[]
Tooltip columns. Also requires tooltipType to be 'Columns'.
settooltipColumns(x):void
Parameters
| Parameter | Type |
|---|---|
x | string[] |
Returns
string[]
Source
tooltipForm
gettooltipForm():string
Tooltip form. Also requires tooltipType to be 'Form'.
settooltipForm(x):void
Parameters
| Parameter | Type |
|---|---|
x | string |
Returns
string
Source
tooltipType
gettooltipType():GridColumnTooltipType
Tooltip type, specific to this column.
settooltipType(x):void
Parameters
| Parameter | Type |
|---|---|
x | GridColumnTooltipType |
Returns
Source
visible
getvisible():boolean
Column visibility.
setvisible(x):void
Parameters
| Parameter | Type |
|---|---|
x | boolean |
Returns
boolean
Source
width
getwidth():number
Column width in pixels. Sample: https://public.datagrok.ai/js/samples/grid/resize-columns
setwidth(x):void
Parameters
| Parameter | Type |
|---|---|
x | number |
Returns
number
Source
Methods
checkEditable()
checkEditable():
string
Returns null if column is editable, or the reason of not being editable, otherwise
Returns
string
Source
getDataWidth()
getDataWidth():
number
Number of pixels required to render the longest element in the column.
Returns
number
Source
getVisibleCells()
getVisibleCells():
Iterable<GridCell<any>>
Returns all visible cells
Returns
Iterable <GridCell<any>>
Source
move()
move(
position):void
Moves the specified column to the specified position
Parameters
| Parameter | Type |
|---|---|
position | number |
Returns
void
Source
scrollIntoView()
scrollIntoView():
void
If this column is not entirely visible, scrolls the grid horizontally to show it.
Returns
void
Source
fromDart()
staticfromDart(dart):null|GridColumn<any>
Parameters
| Parameter | Type |
|---|---|
dart | any |
Returns
null | GridColumn<any>