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

gridx.core.Column

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

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

Method Summary

  • cell(row, isId, parentId) returns gridx.core.Cell|null Get a cell object in this column
  • cells(start, count, parentId) returns gridx.core.Cell[] Get cells in this column. If some rows are not in cache, there will be NULLs in the returned array.
  • constructor(grid, id)
  • def() returns Object Get the definition of this column
  • field() returns String Get the store field of this column
  • getWidth() returns String Get the width of this column
  • index() returns Integer Get the index of this column
  • name() returns String Get the name of this column.
  • setName(name) returns gridx.core.Column Set the name of this column

Methods

cell
Returns gridx.core.Cell|null: If the params are valid and the row is in cache return a cell object, else return null
Get a cell object in this column
ParameterTypeDescription
rowgridx.core.Row|Integer|StringRow index or row ID or a row object
isId
parentId
cells
Returns gridx.core.Cell[]: An array of cells in this column
Get cells in this column. If some rows are not in cache, there will be NULLs in the returned array.
ParameterTypeDescription
startInteger
Optional.
The row index of the first cell in the returned array. If omitted, defaults to 0, so column.cells() gets all the cells.
countInteger
Optional.
The number of cells to return. If omitted, all the cells starting from row 'start' will be returned.
parentId
constructor
ParameterTypeDescription
grid
id
def
Returns Object: The definition of this column
Get the definition of this column
field
Returns String: The store field of this column

If a column corresponds to a field in store, this method returns the field. It's possible for a column to have no store field related.

getWidth
Returns String: The CSS value of column width
Get the width of this column
index
Returns Integer: The index of this column
Get the index of this column
name
Returns String: The name of this column

Column name is the string displayed in the grid header cell. Column names can be anything. Two columns can share one name. But they must have different IDs.

setName
Returns gridx.core.Column: Return self reference, so as to cascade methods
Set the name of this column
ParameterTypeDescription
nameStringThe new name