In obj.treeToGridElement how do you get the Grid Object

During the event that is caught by treeToGridElement, how do you transform the guid supplied to an actual grid object?

    grid.treeToGridElement = function (treeObj, treeNodeId, gridId) {
        var nDragType = treeObj.getUserData(treeNodeId, "type");
        var Grid= document.getElementById(gridId);
    }

Is not working, likely since it is looking for the name.

Unfortunately your issue is not clear.
Please, clarify the expected result.
Here you can find the example of the method usage:
dhtmlx.com/docs/products/dht … ction.html

I found out what my issue was. I did not have the treeToGridElement event function in the Grid object script itself, rather in the script using the Grid. After I moved it to the Grid script, I found I could just use the this reference to get the Grid object.

But it still leaves the general question, how does one go about getting a reference to the object when all you have the UI id, is there some global query function that can provide that?