Javascript references to grids

I have multiple grids on multiple tabs in my application. I don’t want to keep a global variable referencing each of my various grids, but I can’t figure out how to get a grid object any other way. I thought document.getElementById(‘myGridId’) would work, but it didn’t. How can I get a reference to a grid from a function?

Unfortunately it’s impossible to do. You can get reference to the element with getElementById() method only if this element is a part of DOM structure. You can get reference to the grid container, but it’s impossible to get reference to the JavaScript object.