How to get grid object in JavaScript?

How can I get JavaScript to find the grid object so I can perform actions on it?



I want to be ableto do something like:



mygrid = document.getElementById(’???’);

mygrid.something(…);



But what is the grid id?

If you creating grid by js code or by dhtmlXGridFromTable command - you get grid object as result of operation.
If you initializing grid from HTML, you can grid object by “name” attribute

<table name="aGrid …



    aGrid.cells(i,j).getValue(…

Please beware that grid object will be available only after document loading.