The GridDecorator
interface is implemented by classes that wish to augment the functionality
provided by the core grid implementation. Grid decorators are not only able to modify the HTML rendered by
the grid, including adding any event listeners they may wish to add, but are also able to register
themselves as listeners on the module:ct-grid/GridRowModel
, the
module:ct-grid/GridRowSelectionModel
, the
module:ct-grid/GridColumnModel
and/or the module:ct-grid/GridView
itself —
the module:ct-component/ComponentLifecycleEvents
events are forwarded on by the
module:ct-grid/GridView
to any interested decorators.
Methods
set Grid View(grid View)
The opportunity for the decorator to add itself as a listener to the module:ct-grid/GridRowModel
,
the module:ct-grid/GridRowSelectionModel
, the module:ct-grid/GridColumnModel
and/or the module:ct-grid/GridView
itself.
At the point at which this method is called, the HTML for the grid will not yet be rendered. Decorators that need
to augment the HTML as soon as it is first rendered must register themselves as a listener on the
module:ct-grid/GridView
, and wait for the
module:ct-grid/GridViewListener#onContainerHtmlRendered
event to be
fired.
Parameters:
Name | Type | Description |
---|---|---|
gridView |
module:ct-grid |
The grid view to which this decorator is being attached. |