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
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
Parameter | Type | Description |
---|---|---|
row | gridx.core.Row|Integer|String | Row index or row ID or a row object |
isId | ||
parentId |
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.
Parameter | Type | Description |
---|---|---|
start | Integer | Optional. The row index of the first cell in the returned array.
If omitted, defaults to 0, so column.cells() gets all the cells. |
count | Integer | Optional. The number of cells to return.
If omitted, all the cells starting from row 'start' will be returned. |
parentId |
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.
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.