I'm using ListGrid.setHoverCustomizer() and in my hoverHTML method I need to get a handle to the grid on which the hover customizer is operating. hoverHTML() is passed the record being hovered over, the row and column numbers, but not the grid itself. I need to get the ListGridField and can do so, given that the colNum is passed to hoverHTML. But how do I get a pointer to the grid itself?
Announcement
Collapse
No announcement yet.
X
-
Currently you can handle this at the application level by hanging onto a reference to the ListGrid in question somewhere - EG using closures, final vars, member vars, etc.
However we recognize that this is trickier than it should be so have made a change in the 3.1d branch to support a "getGrid()" API directly on the HoverCustomizer object.
This will be present in nightly builds going forward
-
Thanks. That does make it easy.
But I have the same issue in a DataArrivedHandler. I need to do some things to the grid when data arrives. If there were only one instance of this grid in the class it would be easy, but this grid is the expansion component of another grid, so there are potentially multiple instances of it.
Comment
Comment