Row

Represents a single rendered row in the grid. Consists of one row element for each SubGrid in use. The grid only creates as many rows as needed to fill the current viewport (and a buffer). As the grid scrolls the rows are repositioned and reused, there is not a one-to-one relation between rows and records.

For normal use cases you should not have to use this class directly. Rely on using renderers instead.

Configs

1
cls: String | DomClassList | Object<String, (Boolean|Number)>Also a property

The class name to initially add to all row elements

Properties

18

Class hierarchy

isRow: Boolean= truereadonly
Identifies an object as an instance of Row class, or subclass thereof.
isRow: Boolean= truereadonlystatic
Identifies an object as an instance of Row class, or subclass thereof.

Other

bottom: Numberreadonly

Row bottom coordinate

cells: HTMLElement[]readonly

Row cell elements

When read, this a DomClassList of class names to be applied to this Row's elements.

It can be set using Object notation where each property name with a truthy value is added as a class, or as a regular space-separated string.

dataIndex: Number

Get/set this rows current index in grids store

element: HTMLElementreadonly

The row element, only applicable when not using multiple grid sections (see elements)

elements: Object<String, HTMLElement>readonly

An object, keyed by region name (for example locked and normal) containing the elements which comprise the full row.

height: Number

Get/set row height

id: String | Number

Get/set id for currently rendered record

index: Numberreadonly

Get index in RowManagers rows array

isFirst: Booleanreadonly

Is this the very first row?

offsetHeight: Number

Get row height including border

top: Numberreadonly

Row top coordinate

Lifecycle

configBase

Functions

23

Other

Add CSS classes to each element.

ParameterTypeDescription
classesString | Object<String, (Boolean|Number)> | DomClassList

Adds/removes class names according to the passed object's properties.

Properties with truthy values are added. Properties with false values are removed.

ParameterTypeDescription
classesObject<String, (Boolean|Number)>

Object containing properties to set/clear

Execute supplied function for each cell.

ParameterTypeDescription
fnfunction

Execute supplied function for each regions element.

ParameterTypeDescription
fnfunction

Get the cell element for the specified column.

ParameterTypeDescription
columnIdString | Number

Column id

Returns: HTMLElement -

Cell element

Get cell elements for specified region.

ParameterTypeDescription
regionString

Region to get elements for

Returns: HTMLElement[] -

Array of cell elements

Get the element for the specified region.

ParameterTypeDescription
regionString
Returns: HTMLElement

Get the element bounds for the specified region of this Row.

ParameterTypeDescription
regionString
Returns: Rectangle

Remove CSS classes from each element.

ParameterTypeDescription
classesString | Object<String, (Boolean|Number)> | DomClassList

Toggle CSS classes for each element.

ParameterTypeDescription
classesObject<String, (Boolean|Number)> | DomClassList | String
addBoolean

Configuration

applyDefaultsstaticBase

Events

Lifecycle

destroystaticBase

Misc

initClassstaticBase
isOfTypeNamestaticBase
mixinstaticBase