Skip to main content

GridColumn<TData>

Represents a grid column

Type parameters

Type parameterValue
TDataany

Constructors

new GridColumn()

new GridColumn<TData>(dart): GridColumn<TData>

Parameters

ParameterType
dartany

Returns

GridColumn<TData>

Source

src/grid.ts:667

Properties

PropertyType
dartany

Accessors

backColor

get backColor(): Color

Background column as a 4-byte ARGB number.

set backColor(x): void

Parameters

ParameterType
xColor

Returns

Color

Source

src/grid.ts:707


categoryColors

get categoryColors(): object

Custom colors for categories. Sample: https://public.datagrok.ai/js/samples/grid/category-colors

set categoryColors(x): void

Parameters

ParameterType
xobject

Returns

object

Source

src/grid.ts:730


cellType

get cellType(): string

set cellType(x): void

Parameters

ParameterType
xstring

Returns

string

Cell type.

Source

src/grid.ts:716


column

get column(): null | Column<TData, TData>

Returns

null | Column<TData, TData>

Corresponding table column, or null.

Source

src/grid.ts:681


contentCellStyle

get contentCellStyle(): GridCellStyle

Cell style used for rendering data cells

Returns

GridCellStyle

Source

src/grid.ts:696


editable

get editable(): boolean

Whether the column is editable.

set editable(x): void

Parameters

ParameterType
xboolean

Returns

boolean

Source

src/grid.ts:735


format

get format(): string

Column format. Sample: https://public.datagrok.ai/js/samples/grid/html-markup-cells

set format(x): void

Parameters

ParameterType
xstring

Returns

string

Source

src/grid.ts:712


grid

get grid(): Grid

A Grid this column is associated with

Returns

Grid

Source

src/grid.ts:676


headerCellStyle

get headerCellStyle(): GridCellStyle

Cell style used for rendering header cells

Returns

GridCellStyle

Source

src/grid.ts:699


idx

get idx(): number

Index of the column.

Returns

number

Source

src/grid.ts:687


isTextColorCoded

get isTextColorCoded(): boolean

isTextColorCoded. Whether to apply color to the text or background.

set isTextColorCoded(x): void

Parameters

ParameterType
xboolean

Returns

boolean

Source

src/grid.ts:755


left

get left(): number

Left border (in pixels in the virtual viewport)

Returns

number

Source

src/grid.ts:764


name

get name(): string

set name(x): void

Parameters

ParameterType
xstring

Returns

string

Column name.

Source

src/grid.ts:692


onPrepareValueScript

get onPrepareValueScript(): string

A script that returns cell value, using the "gridCell" parameter. See example: ApiSamples/grid/advanced/dynamic-value-retrieval.js

set onPrepareValueScript(x): void

Parameters

ParameterType
xstring

Returns

string

Source

src/grid.ts:760


renderer

get renderer(): GridCellRenderer<any>

Grid cell renderer.

set renderer(x): void

Parameters

ParameterType
xGridCellRenderer<any>

Returns

GridCellRenderer<any>

Source

src/grid.ts:720


get right(): number

Right border (in pixels in the virtual viewport)

Returns

number

Source

src/grid.ts:767


selected

get selected(): boolean

Whether the column is selected.

set selected(x): void

Parameters

ParameterType
xboolean

Returns

boolean

Source

src/grid.ts:739


settings

get settings(): any

Grid column settings.

set settings(s): void

Parameters

ParameterType
sany

Returns

any

Source

src/grid.ts:773


tags

get tags(): object

Use this field to keep arbitrary auxiliary data. It is serialized as JSON, so be careful. See also temp.

Returns

object

Source

src/grid.ts:777


temp

get temp(): object

Use this field to keep auxiliary data. It is not serialized. See also tags.

Returns

object

Source

src/grid.ts:780


tooltipColumns

get tooltipColumns(): string[]

Tooltip columns. Also requires tooltipType to be 'Columns'.

set tooltipColumns(x): void

Parameters

ParameterType
xstring[]

Returns

string[]

Source

src/grid.ts:751


tooltipForm

get tooltipForm(): string

Tooltip form. Also requires tooltipType to be 'Form'.

set tooltipForm(x): void

Parameters

ParameterType
xstring

Returns

string

Source

src/grid.ts:747


tooltipType

get tooltipType(): GridColumnTooltipType

Tooltip type, specific to this column.

set tooltipType(x): void

Parameters

ParameterType
xGridColumnTooltipType

Returns

GridColumnTooltipType

Source

src/grid.ts:743


visible

get visible(): boolean

Column visibility.

set visible(x): void

Parameters

ParameterType
xboolean

Returns

boolean

Source

src/grid.ts:724


width

get width(): number

Column width in pixels. Sample: https://public.datagrok.ai/js/samples/grid/resize-columns

set width(x): void

Parameters

ParameterType
xnumber

Returns

number

Source

src/grid.ts:703

Methods

checkEditable()

checkEditable(): string

Returns null if column is editable, or the reason of not being editable, otherwise

Returns

string

Source

src/grid.ts:783


getDataWidth()

getDataWidth(): number

Number of pixels required to render the longest element in the column.

Returns

number

Source

src/grid.ts:789


getVisibleCells()

getVisibleCells(): Iterable <GridCell<any>>

Returns all visible cells

Returns

Iterable <GridCell<any>>

Source

src/grid.ts:770


move()

move(position): void

Moves the specified column to the specified position

Parameters

ParameterType
positionnumber

Returns

void

Source

src/grid.ts:786


scrollIntoView()

scrollIntoView(): void

If this column is not entirely visible, scrolls the grid horizontally to show it.

Returns

void

Source

src/grid.ts:792


fromDart()

static fromDart(dart): null | GridColumn<any>

Parameters

ParameterType
dartany

Returns

null | GridColumn<any>

Source

src/grid.ts:671