AnyChart
API Reference
Still have questions?
Contact support
Top
You are looking at an outdated 7.6.0 version of this document. Switch to the 8.4.0 version to see the up to date information.

class anychart.core.ui.DataGrid.Column Improve this Doc

Extends: anychart.core.VisualBase

Data grid column.

Methods Overview

Miscellaneous
cellTextSettings()Getter for label factory.
cellTextSettingsOverrider()Getter for cells text settings overrider.
collapseExpandButtons()Getter for expand or collapse buttons.
defaultWidth()Getter for the current column default width.
depthPaddingMultiplier()Getter for multiplier to choose a left padding.
enabled()Getter for the current element state (enabled or disabled).
setColumnFormat()Sets column format using enum.
textFormatter()Sets cell text value formatter.
title()Getter for column title.
width()Getter for column width.

Methods Description

cellTextSettings

Getter for label factory.

Returns:

anychart.core.ui.LabelsFactory - Label factory instance for method chaining.
Setter for label factory to decorate cells.

Params:

NameTypeDescription
valueObjectValue to set.

Returns:

anychart.core.ui.DataGrid.Column - Self instance for method chaining.

cellTextSettingsOverrider

Getter for cells text settings overrider.

Returns:

function - Current cells text settings overrider.
Setter for cells text settings overrider.

Params:

NameTypeDefaultDescription
valuefunction
function(label, dataItem){}
Value to set.

Returns:

anychart.core.ui.DataGrid.Column - Self instance for method chaining.

collapseExpandButtons

Getter for expand or collapse buttons.

Returns:

boolean - Current value.
Setter for expand or collapse buttons.

Params:

NameTypeDefaultDescription
valueboolean
true
Value to set.

Returns:

anychart.core.ui.DataGrid.Column - Self instance for method chaining.

defaultWidth

Getter for the current column default width.

Returns:

number - The current default width.
Setter for the column default width.

Params:

NameTypeDescription
valuenumberDefault width value.

Returns:

anychart.core.ui.DataGrid.Column - Self instance for method chaining.

depthPaddingMultiplier

Getter for multiplier to choose a left padding.

Returns:

number - Current value.
Setter for multiplier to choose a left padding.

Params:

NameTypeDefaultDescription
valuenumber
15
Value to set.

Returns:

anychart.core.ui.DataGrid.Column - Self instance for method chaining.

enabled

Getter for the current element state (enabled or disabled).

Returns:

boolean - The current element state.
Setter for the element enabled state.

Params:

NameTypeDefaultDescription
valueboolean
true
Value to set.

Returns:

anychart.core.ui.DataGrid.Column - Self instance for method chaining.

setColumnFormat

Sets column format using enum.

Params:

NameTypeDescription
fieldNamestringName of field of data item to work with.
presetValueanychart.enums.ColumnFormatsPreset column format.

Returns:

anychart.core.ui.DataGrid.Column - Self instance for method chaining.
Sets column format using object.

Params:

NameTypeDescription
fieldNamestringName of field of data item to work with.
settingsObjectCustom column format.

Returns:

anychart.core.ui.DataGrid.Column - Self instance for method chaining.

textFormatter

Sets cell text value formatter.

Params:

NameTypeDefaultDescription
valuefunction
function(dataItem) { return '');}
Function that looks like function( // anychart.data.Tree.DataItem - tree data item){ // this.column return textValue; // type string }. Function that returns a text value for the cell by data item.

Returns:

anychart.core.ui.DataGrid.Column - Self instance for method chaining.

title

Getter for column title.

Returns:

anychart.core.ui.Title - Title instance for method chaining.
Setter for column title.

Params:

NameTypeDefaultDescription
valuenull | boolean | Object | string
true
Value to set.

Returns:

anychart.core.ui.DataGrid.Column - Self instance for method chaining.

width

Getter for column width.

Returns:

number | string - Current column width.
Setter for column width.

Params:

NameTypeDefaultDescription
valuenumber | string
0
Width value.

Returns:

anychart.core.ui.DataGrid.Column - Self instance for method chaining.