Skip to main content

GridColumn

Represents a grid column

Constructors

new GridColumn()

new GridColumn(dart): GridColumn

Parameters

ParameterType
dartany

Returns

GridColumn

Source

src/grid.ts:603

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:643


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:666


cellType

get cellType(): string

set cellType(x): void

Parameters

ParameterType
xstring

Returns

string

Cell type.

Source

src/grid.ts:652


column

get column(): null | Column<any>

Returns

null | Column<any>

Corresponding table column, or null.

Source

src/grid.ts:617


contentCellStyle

get contentCellStyle(): GridCellStyle

Cell style used for rendering data cells

Returns

GridCellStyle

Source

src/grid.ts:632


editable

get editable(): boolean

Whether the column is editable.

set editable(x): void

Parameters

ParameterType
xboolean

Returns

boolean

Source

src/grid.ts:671


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:648


grid

get grid(): Grid

A Grid this column is associated with

Returns

Grid

Source

src/grid.ts:612


headerCellStyle

get headerCellStyle(): GridCellStyle

Cell style used for rendering header cells

Returns

GridCellStyle

Source

src/grid.ts:635


idx

get idx(): number

Index of the column.

Returns

number

Source

src/grid.ts:623


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:691


left

get left(): number

Left border (in pixels in the virtual viewport)

Returns

number

Source

src/grid.ts:695


name

get name(): string

set name(x): void

Parameters

ParameterType
xstring

Returns

string

Column name.

Source

src/grid.ts:628


renderer

get renderer(): GridCellRenderer

Grid cell renderer.

set renderer(x): void

Parameters

ParameterType
xGridCellRenderer

Returns

GridCellRenderer

Source

src/grid.ts:656


get right(): number

Right border (in pixels in the virtual viewport)

Returns

number

Source

src/grid.ts:698


selected

get selected(): boolean

Whether the column is selected.

set selected(x): void

Parameters

ParameterType
xboolean

Returns

boolean

Source

src/grid.ts:675


settings

get settings(): any

Grid column settings.

set settings(s): void

Parameters

ParameterType
sany

Returns

any

Source

src/grid.ts:704


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:708


temp

get temp(): object

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

Returns

object

Source

src/grid.ts:711


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:687


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:683


tooltipType

get tooltipType(): GridColumnTooltipType

Tooltip type, specific to this column.

set tooltipType(x): void

Parameters

ParameterType
xGridColumnTooltipType

Returns

GridColumnTooltipType

Source

src/grid.ts:679


visible

get visible(): boolean

Column visibility.

set visible(x): void

Parameters

ParameterType
xboolean

Returns

boolean

Source

src/grid.ts:660


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:639

Methods

checkEditable()

checkEditable(): string

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

Returns

string

Source

src/grid.ts:714


getDataWidth()

getDataWidth(): number

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

Returns

number

Source

src/grid.ts:720


getVisibleCells()

getVisibleCells(): Iterable <GridCell>

Returns all visible cells

Returns

Iterable <GridCell>

Source

src/grid.ts:701


move()

move(position): void

Moves the specified column to the specified position

Parameters

ParameterType
positionnumber

Returns

void

Source

src/grid.ts:717


scrollIntoView()

scrollIntoView(): void

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

Returns

void

Source

src/grid.ts:723


fromDart()

static fromDart(dart): null | GridColumn

Parameters

ParameterType
dartany

Returns

null | GridColumn

Source

src/grid.ts:607