$$('grid').clearAll()

Hi
I am using the RC of dhtmlxTouch, I have the following extracts

in the the declarations , I have

              header:"Data",
                headerAlt:"Data (closed)",
                id:"portfolio",
                body:{
                    view:"grid",
                    select:"multiselect",
                    datatype:'xml',  

I am getting “TypeError: Result of expression ‘$$(‘portfolio’).clearAll()’[undefined] is not a function” when used within a function.

Am I doing something stupid?
Thanks for your help

clearAll is method of the grid, so you need to use

[code]header:“Data”,
headerAlt:“Data (closed)”,
id:“portfolio”,
body:{
view:“grid”,
id:“portfoliogrid”,


$$(‘portfoliogrid’).clearAll();[/code]

I thought that it was me just being stupid - thanks for confirming my thoughts!
So obvious when you see it printed out.
Thanks