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

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

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

cellMixin
Overrides _Module
domNode
Overrides _Module
grid
Overrides _Module
rowMixin
Overrides _Module

Methods

_blurCell
Overrides _Module
_buildCellContent
Overrides _Module
ParameterTypeDescription
cell
isPadding
_buildCells
Overrides _Module
ParameterTypeDescription
row
_buildRowContent
Overrides _Module
ParameterTypeDescription
rowInfo
_buildRows
Overrides _Module
ParameterTypeDescription
start
count
uncachedRows
renderedRows
_buildUncachedRows
Overrides _Module
ParameterTypeDescription
uncachedRows
_decorateEvent
Overrides _Module
ParameterTypeDescription
e
_doFocus
Overrides _Module
ParameterTypeDescription
evt
_focusCell
Overrides _Module
ParameterTypeDescription
evt
rowVisIdx
colIdx
_getRowNodeQuery
Overrides _Module
ParameterTypeDescription
args
_initFocus
Overrides _Module
_loadFail
Overrides _Module
ParameterTypeDescription
e
_moveFocus
Overrides _Module
ParameterTypeDescription
rowStep
colStep
evt
_nextCell
Overrides _Module
ParameterTypeDescription
r
c
dir
checker
_onCellMouseOver
Overrides _Module
ParameterTypeDescription
e
_onDelete
Overrides _Module
ParameterTypeDescription
id
_onFocus
Overrides _Module
ParameterTypeDescription
evt
_onMouseEvent
Overrides _Module
ParameterTypeDescription
eventName
e
_onRowMouseOver
Overrides _Module
ParameterTypeDescription
e
_onSet
Overrides _Module
ParameterTypeDescription
id
index
rowCache
oldCache
_onSizeChange
Overrides _Module
ParameterTypeDescription
size
oldSize
_wrapCellData
Overrides _Module
ParameterTypeDescription
cellData
rowId
colId
collectCellWrapper
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.
constructor
Overrides _Module
destroy
Overrides _Module
getAPIPath
Overrides _Module
getCellNode
Overrides _Module
Returns DOMNode|null: The DOM node of the cell. Null if not found.
Get the DOM node of a cell
ParameterTypeDescription
argsgridx.__RowCellInfoA cell info object containing sufficient info
getRowInfo
Overrides _Module
Returns gridx.__RowCellInfo: A row info object containing as complete as possible row info.
Get complete row info by partial row info
ParameterTypeDescription
argsgridx.__RowCellInfoA row info object containing partial row info
getRowNode
Overrides _Module
Returns DOMNode|null: The DOM node of the row. Null if not found.
Get the DOM node of a row
ParameterTypeDescription
argsgridx.__RowCellInfoA row info object containing row index or row id
load
Overrides _Module
ParameterTypeDescription
args
preload
Overrides _Module
refresh
Overrides _Module
Returns dojo.Deferred: A deferred object indicating when the refreshing process is finished.
Refresh the grid body
ParameterTypeDescription
startInteger
Optional.
The visual row index to start refresh. If omitted, default to 0.
refreshCell
Overrides _Module
Returns dojo.Deferred: A deferred object indicating when this refreshing process is finished.
Refresh a single cell
ParameterTypeDescription
rowVisualIndexIntegerThe visual index of the row of this cell
columnIndexIntegerThe index of the column of this cell
renderRows
Overrides _Module
ParameterTypeDescription
start
count
position?top|bottom
isRefresh
unrenderRows
Overrides _Module
ParameterTypeDescription
count
preOrPost
updateRootRange
Overrides _Module
ParameterTypeDescription
start
count

Events

onAfterCell
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
onAfterRow
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.
onDelete
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.
onEmpty
Overrides _Module
Fired when there's no rows in current body view.
onForcedScroll
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.
onMoveToCell
Overrides _Module
Fired when the focus is moved to a body cell by keyboard.
onRender
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.
onSet
Overrides _Module
Fired when a row in current view is updated in store. row: gridx.core.Row A row object representing the updated row.
onUnrender
Overrides _Module
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.