v7.3.0
SupportExamplesFree Trial

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 : Grid The Grid that owns the GridLocation.
  • record : Model The record of the row that owns the GridLocation. (null if the header).
  • rowIndex : Number The zero-based index of the row that owns the GridLocation. (-1 means the header).
  • column : Column The Column that owns the GridLocation.
  • columnIndex : Number The zero-based index of the column that owns the GridLocation.
  • cell : HTMLElement The referenced cell element.
  • target : HTMLElement The 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

No results

Configs

Configs are options you supply in a configuration object when creating an instance of this class
  • The Column which this GridLocation references. (unless columnIndex or columnId is used to configure)

    Has a corresponding runtime column property.

  • The column id which this GridLocation references. (unless column or columnIndex is used to configure)

  • The column index which this GridLocation references. (unless column or columnId is used to configure)

    Has a corresponding runtime columnIndex property.

  • The field of the column index which this GridLocation references. (unless another column identifier is used to configure)

  • The grid which this GridLocation references.

    Has a corresponding runtime grid property.

  • The record which this GridLocation references. (unless rowIndex is used to configure)

    Has a corresponding runtime record property.

Properties

Properties are getters/setters or publicly accessible variables on this class
    • cell : HTMLElement
      READONLY

      The cell DOM element which this GridLocation references.

    • column : Column
      READONLY

      Yields the Column of this location.

      Has a corresponding column config.

    • columnIndex : Number
      READONLY

      Yields the column index of this location.

      Has a corresponding columnIndex config.

    • This property is true if the focus is inside the cell, not on the cell.

    • grid : Grid
      READONLY

      The grid which this GridLocation references.

      Has a corresponding grid config.

    • isActionable : Boolean
      READONLY

      This property is true if the focus target is not the cell itself.

    • isCell : Boolean
      READONLY

      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.

    • record : Model
      READONLY

      Yields the Model of this location, or null if the location is a column header.

      Has a corresponding record config.

    • rowIndex : Number
      READONLY

      Yields the row index of this location.

      Has a corresponding rowIndex config.

    • visibleRowIndex : Number
      private
      READONLY

      Used by GridNavigation.

    Functions

    Functions are methods available for calling on the class

      Source path

      Grid/util/GridLocation.js

      Contents