Interface implemented by classes wishing to listen to state events on the grid view. Classes that are
interested in listening to these events can subscribe to them via module:ct-grid/GridView#addGridViewListener
,
and can then later be removed via module:ct-grid/GridView#removeGridViewListener
. Classes that
wish to provide an implementation of a GridViewListener
must implement this interface.
Methods
on Activate()
Called when the view becomes the actively selected component.
on All Rows Received()
This call-back is invoked when all outstanding row data has been received.
The firing of this call-back corresponds to the firing of the
module:ct-grid/GridRowModelListener#onAllDataReceived
method on the underlying
module:ct-grid/GridRowModel
, but additionally occurs after all row
rendering for these updates has taken place.
on Close()
Called when the view is closed. Arguments are possible.
on Container Html Rendered()
Called when the grid view has rendered some container html — everything but the row data.
This call occurs as soon the view is made aware of the number of rows available within its underlying
module:ct-grid/GridRowModel
(via module:ct-grid/GridRowModelListener#onSizeChanged
).
on Deactivate()
Called when the view ceases to be the actively selected component.
on Hide()
Called when the view is hidden. Arguments are possible.
on Maximize()
Called when the view is maximised. Arguments are possible.
on Minimize()
Called when the view is minimised. Arguments are possible.
on Open(nWidth, nHeight)
Called when the view is opened. Arguments are possible.
Parameters:
Name | Type | Description |
---|---|---|
nWidth |
int | the width of the grid. |
nHeight |
int | the height of the grid. |
on Resize(nWidth, nHeight)
Called when the grid is resized.
Parameters:
Name | Type | Description |
---|---|---|
nWidth |
int | The width of the resized grid. |
nHeight |
int | The height of the resized grid. |
on Restore()
Called when the view is restored. Arguments are possible.
on Scroll(nScroll Amount, nPrevious Start Index)
Optional. Called when the view is scrolled.
Parameters:
Name | Type | Description |
---|---|---|
nScrollAmount |
int | the total height in pixels from the start index. |
nPreviousStartIndex |
int | the index of the first visible row from the last load. |
on Scroll Complete()
Called when the view is scrolled.
implement module:ct-grid/GridView#onScrollVertical
or
implement module:ct-grid/GridView#onScrollHorizontal
instead
- Deprecated:
- Yes
on Scroll Horizontal(nScroll)
Called when the view is scrolled horizontally.
Parameters:
Name | Type | Description |
---|---|---|
nScroll |
int | new horizontal offset |
on Scroll Vertical(nScroll Amount, nNew Start Index)
Called when the view is scrolled vertically.
Parameters:
Name | Type | Description |
---|---|---|
nScrollAmount |
int | the number of rows the view has been moved by (a positive number if the grid has scrolled down, and a negative number if the grid has been scrolled up) |
nNewStartIndex |
int | the new index of the first visible row |
on Show()
Called when the view is shown. Arguments are possible.
on View Redrawn(pIndices)
This call-back is invoked when a change occurs that requires the view HTML to be redrawn. For example, when a grid is resized or when a set of child rows in an expandable grid are opened or closed.
Decorators whose changes may be destroyed by a large scale redraw of the view can use this call-back method to re-apply any changes they've made.
Parameters:
Name | Type | Description |
---|---|---|
pIndices |
Array | The list of row indices for which the subject has changed. |
on Visible Row Count Changed(nOld Row Count, nNew Row Count)
Called when the grid is resized, so that there more or less rows than before.
Parameters:
Name | Type | Description |
---|---|---|
nOldRowCount |
int | the number of rows before the resize |
nNewRowCount |
int | the number of rows after the resize |