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(’???’);


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 …


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