Get dynamically created grid object

Hi,
I have a grid that is created dynamically based on the selected row of another grid. Now, for reasons beyond my control our grids are created using a php script and the object itself is assigned to a randomly generated variable name.

From my parent form I need access to the dynamically created grid, but unfortunately I only have access to the div that contains the grid as well as the textual name of the grid object in the ‘id’ attribute of the container div.

My question is this: Is there a static method that will get me access to the grid object using the information I have, or should I just use a global?
I understand that the architecture may not be perfect but its what we have.

Thanks

Unfortunately such feature is not available.
The id of the container is not enough. You should know the name of of the grid’s object.