Caplin Trader 4.7.1

Interface: module:caplin/grid/GridViewListener

module:caplin/grid/GridViewListener

Methods

onActivate()

Called when the view becomes the actively selected component.
Implementations:

onAllRowsReceived()

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:caplin/grid/GridRowModelListener#onAllDataReceived method on the underlying module:caplin/grid/GridRowModel, but additionally occurs after all row rendering for these updates has taken place.

Implementations:

onClose()

Called when the view is closed. Arguments are possible.
Implementations:

onContainerHtmlRendered()

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:caplin/grid/GridRowModel (via module:caplin/grid/GridRowModelListener#onSizeChanged).

Implementations:

onDeactivate()

Called when the view ceases to be the actively selected component.
Implementations:

onHide()

Called when the view is hidden. Arguments are possible.
Implementations:
  • module:caplin/grid/decorator/ContainerExportDecorator#onHide

onMaximize()

Called when the view is maximised. Arguments are possible.

onMinimize()

Called when the view is minimised. Arguments are possible.

onOpen(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.
Implementations:

onResize(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.
Implementations:

onRestore()

Called when the view is restored. Arguments are possible.

onScroll(nScrollAmount, nPreviousStartIndex)

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.
Implementations:
  • module:caplin/grid/decorator/RowLoadingDecorator#onScroll
  • module:caplin/grid/decorator/ScrollTipDecorator#onScroll

onScrollComplete()

Called when the view is scrolled vertically. implement module:caplin/grid/GridView#onScrollVertical instead
Deprecated:
  • Yes

onScrollHorizontal(nScroll)

Called when the view is scrolled horizontally.
Parameters:
Name Type Description
nScroll int new horizontal offset

onScrollVertical(nScrollAmount, nNewStartIndex)

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
Implementations:
  • module:caplin/grid/decorator/ScrollTipDecorator#onScrollVertical

onShow()

Called when the view is shown. Arguments are possible.
Implementations:
  • module:caplin/grid/decorator/ContainerExportDecorator#onShow

onViewRedrawn(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.
Implementations:

onVisibleRowCountChanged(nOldRowCount, nNewRowCount)

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