gridx
Legend: Array Boolean Constructor Date DomNode Error Function Namespace Number Object RegExp Singleton String

gridx.core.Row

Object » gridx.core.Row
dojo.require("gridx.core.Row");
Defined in gridx/core/Row.js

An instance of this class represents a grid row. This class should not be directly instantiated by users. It should be returned by grid APIs.

Method Summary

  • cell(column, isId) returns gridx.core.Cell|null Get a cell object in this row
  • cells(start, count) returns gridx.core.Cell[] Get cells in this row.
  • constructor(grid, id)
  • data() returns Object Get the grid data in this row.
  • index() returns Integer Get the index of this row
  • item() returns Object Get the store item of this row
  • parent() returns gridx.core.Row
  • rawData() returns Object Get the store data in this row.
  • setRawData(rawData) returns dojo.Deferred Set new raw data of this row into the store

Methods

cell
Returns gridx.core.Cell|null: If the params are valid return the cell object, else return null.
Get a cell object in this row
ParameterTypeDescription
columngridx.core.Column|Integer|StringColumn index or column ID or a column object
isIdBoolean
Optional.
If the column parameter is a numeric ID, set this to true
cells
Returns gridx.core.Cell[]: An array of cells in this row
Get cells in this row.
ParameterTypeDescription
startInteger
Optional.
The column index of the first cell in the returned array. If omitted, defaults to 0, so row.cells() gets all the cells.
countInteger
Optional.
The number of cells to return. If omitted, all the cells starting from column 'start' will be returned.
constructor
ParameterTypeDescription
grid
id
data
Returns Object: An associative array using column IDs as keys and grid data as values

Grid data means the result of the formatter functions (if exist). It can be different from store data (a.k.a. raw data).

index
Returns Integer: The row index
Get the index of this row
item
Returns Object: A store item

If using the old dojo.data store, store items usually have complicated structures, and they are also useful when doing store operations.

parent
Returns gridx.core.Row
rawData
Returns Object: An associative array using store fields as keys and store data as values

Store data means the data defined in store. It is the data before applying the formatter functions. It can be different from grid data (a.k.a. formatted data)

setRawData
Returns dojo.Deferred: If using server side store, a Deferred object is returned to indicate when the operation is finished.
Set new raw data of this row into the store
ParameterTypeDescription
rawDataObjectThe new data to be set. It can be incomplete, only providing a few fields.