GridCell
Represents a grid cell
Constructors
new GridCell()
new GridCell(
dart
):GridCell
Parameters
Parameter | Type |
---|---|
dart | any |
Returns
Source
Properties
Property | Type |
---|---|
dart | any |
Accessors
bounds
get
bounds():Rect
Grid cell bounds. Sample: https://public.datagrok.ai/js/samples/grid/cell-bounds
Returns
Source
cell
get
cell():Cell
Returns
Corresponding table cell.
Source
cellType
get
cellType():string
Returns
string
Cell type
Source
color
get
color():number
Calculates cell background color, according to color-coding.
Returns
number
Source
customText
get
customText():string
Custom text to be shown in a cell .
set
customText(x
):void
Parameters
Parameter | Type |
---|---|
x | string |
Returns
string
Source
documentBounds
get
documentBounds():Rect
Grid cell bounds, relative to the document. Useful for showing hints, tooltips, etc.
Returns
Source
element
get
element():HTMLElement
Gets or sets HTML element for this grid cell.
set
element(e
):void
Parameters
Parameter | Type |
---|---|
e | HTMLElement |
Returns
HTMLElement
Source
grid
get
grid():Grid
Returns
this cell belongs to.
Source
gridColumn
get
gridColumn():GridColumn
Returns
Corresponding grid column.
Source
gridRow
get
gridRow():number
Returns
number
Index of the corresponding grid row.
Source
isColHeader
get
isColHeader():boolean
Returns
boolean
Whether this is a column header.
Source
isRowHeader
get
isRowHeader():boolean
Returns
boolean
Whether this is a row header.
Source
isTableCell
get
isTableCell():boolean
Returns
boolean
Whether this is a table (data) cell (as opposed to special cells like row headers).
Source
renderer
get
renderer():GridCellRenderer
Returns grid cell renderer.
Returns
Source
style
get
style():GridCellStyle
Returns
Style to use for rendering.
Source
tableColumn
get
tableColumn():null
|Column
<any
>
Returns
null
| Column
<any
>
Corresponding table column, or null.
Source
tableRow
get
tableRow():null
|Row
Returns
null
| Row
Corresponding table row, or null.
Source
tableRowIndex
get
tableRowIndex():null
|number
Returns
null
| number
Index of the corresponding table row.
Source
Methods
setValue()
setValue(
x
,notify
):void
Sets the grid cell value and fires onCellValueEdited if notify is true
Parameters
Parameter | Type | Default value |
---|---|---|
x | any | undefined |
notify | boolean | true |
Returns
void
Source
fromColumnRow()
static
fromColumnRow(grid
,columnName
,gridRow
):GridCell
Parameters
Parameter | Type |
---|---|
grid | Grid |
columnName | string |
gridRow | number |
Returns
Source
fromValue()
static
fromValue(value
):GridCell
Returns a synthecic GridCell that only contains value but no row/col. Useful for rendering values.
Parameters
Parameter | Type |
---|---|
value | any |