treegrid: expandAll if nothing from loadOpenStates

what I want is that, tree grid shows in all expanded (first time) if there is nothing returned from loadOpenStates.

I am using load and save open states but very first time when user visits he sees all nodes open by default rather than all closed. How to do it?

Hi,
To expand all nodes in dhtmlxTreeGrid you can use expandAll() method http://docs.dhtmlx.com/doku.php?id=dhtmlxtreegrid:api_method_dhtmlxgridobject_expandall

problem is expandAll() overrides loadOpenStates()

I want some thing like this,

if there is no open states cookie, then expandAll() else load open states from cookie. How do I do it?

psuedo code of what I want, not real code.

if (not grid.loadOpenStates()){
grid.expandAll();
}
else
grid.loadOpenStates()

It can be done only with code modification. Please open ticket at support.dhtmlx.com/ and we’ll provide you workaround