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.
Configs
7
Configs
7The Column which this GridLocation references. (unless columnIndex or columnId is used to configure)
The column id which this GridLocation references. (unless column or columnIndex is used to configure)
The field of the column index which this GridLocation references. (unless another column identifier is used to configure)
The grid which this GridLocation references.
The record which this GridLocation references. (unless rowIndex is used to configure)
Properties
12
Properties
12The cell DOM element which this GridLocation references.
Yields the Column of this location.
Yields the column index of this location.
This property is true if the focus is inside the cell, not on the cell.
The grid which this GridLocation references.
This property is true if the focus target is not the cell itself.
This property is true if this location represents a cell in the grid body.
This property is true if this location represents a column header.
Yields true if the cell and row are selectable.
That is if the record is present in the grid's store and it's not a group summary or group header record.
Yields the Model of this location, or null if the location is a column header.
Yields the row index of this location.
Functions
2
Functions
2Initializes a new GridLocation.
| Parameter | Type | Description |
|---|---|---|
location | GridLocationConfig | HTMLElement | A grid location specifier. This may be:
|
Returns a *new * GridLocation instance having moved from the current location in the
mode specified.
| Parameter | Type | Description |
|---|---|---|
where | Number | Where to move from this
|
A GridLocation object encapsulating the target location.