gridx.modules.Body
Object » _Module » gridx.modules.Body
dojo.require("gridx.modules.Body");
Defined in gridx/modules/Body.js
This module is in charge of row rendering. It should be compatible with virtual/non-virtual scroll, pagination, details on demand, and even tree structure.
Property Summary
Method Summary
- _blurCell()
- _buildCellContent(cell, isPadding)
- _buildCells(row)
- _buildRowContent(rowInfo)
- _buildRows(start, count, uncachedRows, renderedRows)
- _buildUncachedRows(uncachedRows)
- _decorateEvent(e)
- _doFocus(evt)
- _focusCell(evt, rowVisIdx, colIdx)
- _getRowNodeQuery(args)
- _initFocus()
- _loadFail(e)
- _moveFocus(rowStep, colStep, evt)
- _nextCell(r, c, dir, checker)
- _onCellMouseOver(e)
- _onDelete(id)
- _onFocus(evt)
- _onMouseEvent(eventName, e)
- _onRowMouseOver(e)
- _onSet(id, index, rowCache, oldCache)
- _onSizeChange(size, oldSize)
- _wrapCellData(cellData, rowId, colId)
- collectCellWrapper() Fired when a cell is being rendered, so as to collect wrappers for the content in this cell. This is currently an inner mechanism used to implement widgets in cell and tree node.
- constructor()
- destroy()
- getAPIPath()
- getCellNode(args) returns DOMNode|null Get the DOM node of a cell
- getRowInfo(args) returns gridx.__RowCellInfo Get complete row info by partial row info
- getRowNode(args) returns DOMNode|null Get the DOM node of a row
- load(args)
- preload()
- refresh(start) returns dojo.Deferred Refresh the grid body
- refreshCell(rowVisualIndex, columnIndex) returns dojo.Deferred Refresh a single cell
- renderRows(start, count, position, isRefresh)
- unrenderRows(count, preOrPost)
- updateRootRange(start, count)
Event Summary
- onAfterCell() Fired when a cell is updated by cell editor (or store data change), or by cell refreshing. Note this is not fired when rendering the whole grid. Use onAfterRow in that case. cell: grid.core.Cell A cell object representing this cell
- onAfterRow() Fired when a row is created, data is filled in, and its node is inserted into the dom tree. row: gridx.core.Row A row object representing this row.
- onDelete() Fired when a row in current view is deleted from the store. Note if the deleted row is not visible in current view, this event will not fire. id: String|Number The ID of the deleted row. index: Integer The index of the deleted row.
- onEmpty() Fired when there's no rows in current body view.
- onForcedScroll() Fired when the body needs to fetch more data, but there's no trigger to the scroller. This is an inner mechanism to solve some problems when using virtual scrolling or pagination. This event should not be used by grid users.
- onMoveToCell() Fired when the focus is moved to a body cell by keyboard.
- onRender() Fired everytime the grid body content is rendered or updated. start: Integer The visual index of the start row that is affected by this rendering. If omitted, all rows are affected. count: Integer The count of rows that is affected by this rendering. If omitted, all rows from start are affected.
- onSet() Fired when a row in current view is updated in store. row: gridx.core.Row A row object representing the updated row.
- onUnrender() Fired when a row is unrendered (removed from the grid dom tree). Usually, this event is only useful when using virtual scrolling. id: String|Number The ID of the row that is unrendered.
Attached Objects
Properties
Methods
Overrides _Module
Fired when a cell is being rendered, so as to collect wrappers for the content in this cell.
This is currently an inner mechanism used to implement widgets in cell and tree node.
Overrides _Module
Returns DOMNode|null: The DOM node of the cell. Null if not found.
Get the DOM node of a cell
Parameter | Type | Description |
---|---|---|
args | gridx.__RowCellInfo | A cell info object containing sufficient info |
Overrides _Module
Returns gridx.__RowCellInfo: A row info object containing as complete as possible row info.
Get complete row info by partial row info
Parameter | Type | Description |
---|---|---|
args | gridx.__RowCellInfo | A row info object containing partial row info |
Overrides _Module
Returns DOMNode|null: The DOM node of the row. Null if not found.
Get the DOM node of a row
Parameter | Type | Description |
---|---|---|
args | gridx.__RowCellInfo | A row info object containing row index or row id |
Overrides _Module
Returns dojo.Deferred: A deferred object indicating when the refreshing process is finished.
Refresh the grid body
Parameter | Type | Description |
---|---|---|
start | Integer | Optional. The visual row index to start refresh. If omitted, default to 0. |
Overrides _Module
Returns dojo.Deferred: A deferred object indicating when this refreshing process is finished.
Refresh a single cell
Parameter | Type | Description |
---|---|---|
rowVisualIndex | Integer | The visual index of the row of this cell |
columnIndex | Integer | The index of the column of this cell |
Events
Overrides _Module
Fired when a cell is updated by cell editor (or store data change), or by cell refreshing.
Note this is not fired when rendering the whole grid. Use onAfterRow in that case.
cell: grid.core.Cell
A cell object representing this cell
Overrides _Module
Fired when a row is created, data is filled in, and its node is inserted into the dom tree.
row: gridx.core.Row
A row object representing this row.
Overrides _Module
Fired when a row in current view is deleted from the store.
Note if the deleted row is not visible in current view, this event will not fire.
id: String|Number
The ID of the deleted row.
index: Integer
The index of the deleted row.
Overrides _Module
Fired when the body needs to fetch more data, but there's no trigger to the scroller.
This is an inner mechanism to solve some problems when using virtual scrolling or pagination.
This event should not be used by grid users.
Overrides _Module
Fired everytime the grid body content is rendered or updated.
start: Integer
The visual index of the start row that is affected by this rendering. If omitted, all rows are affected.
count: Integer
The count of rows that is affected by this rendering. If omitted, all rows from start are affected.
Overrides _Module
Fired when a row in current view is updated in store.
row: gridx.core.Row
A row object representing the updated row.