GridLocation
This class encapsulates a reference to a specific navigable grid location.
This encapsulates a grid cell based upon the record and column, but in addition, it could represent an actionable location within a cell* if the target is not the grid cell in question.
A GridLocation is immutable. That is, once instantiated, the record and column, which it references cannot be changed. The move method returns a new instance.
A GridLocation that encapsulates a cell within the body of a grid will have the following read-only properties:
- grid :
GridThe Grid that owns theGridLocation. - record :
ModelThe record of the row that owns the GridLocation. (nullif the header). - rowIndex :
NumberThe zero-based index of the row that owns the GridLocation. (-1 means the header). - column :
ColumnThe Column that owns the GridLocation. - columnIndex :
NumberThe zero-based index of the column that owns the GridLocation. - cell :
HTMLElementThe referenced cell element. - target :
HTMLElementThe focusable element. This may be the cell, or a child of the cell.
If the location is a column header, the record will be null, and the rowIndex will be -1.
Useful properties
| Property | Description |
|---|---|
| grid | The owning grid instance |
| record | The row's record (null for headers) |
| column | The column |
| cell | The cell DOM element |
| rowIndex | Zero-based row index (-1 for headers) |
| columnIndex | Zero-based column index |
See also
Configs
Configs are options you supply in a configuration object when creating an instance of this class-
The Column which this
GridLocationreferences. (unless columnIndex or columnId is used to configure)Has a corresponding runtime column property.
-
The column id which this
GridLocationreferences. (unless column or columnIndex is used to configure) -
The column index which this
GridLocationreferences. (unless column or columnId is used to configure)Has a corresponding runtime columnIndex property.
-
The field of the column index which this
GridLocationreferences. (unless another column identifier is used to configure) -
The grid which this
GridLocationreferences.Has a corresponding runtime grid property.
Properties
Properties are getters/setters or publicly accessible variables on this class-
The cell DOM element which this
GridLocationreferences. -
Yields the column index of this location.
Has a corresponding columnIndex config.
-
This property is
trueif the focus is inside the cell, not on the cell. -
The grid which this
GridLocationreferences.Has a corresponding grid config.
-
This property is
trueif the focus target is not the cell itself. -
This property is
trueif this location represents a cell in the grid body. -
This property is
trueif this location represents a column header. -
Yields the row index of this location.
Has a corresponding rowIndex config.
-
Used by GridNavigation.