Dynamically Expanding a Tree Node (from code, without user c

Is there a way, when loading a tree grid whose child nodes will be expanded only when the user clicks the “+” next to the parent rows, to dynamically expand several of the parent nodes, such that they will already be expanded when the tree grid is displayed on the page? For instance, if the following tree was to be displayed:

1 Level1-1

2 Level2-1

3 Level2-2

4 Level1-2

5 Level2-3

6 Level1-3

7 Level2-4

Normally you would see

+ Level1-1

+ Level1-2

+ Level1-3

Is there a way to specify that row 1 should be expanded such that the grid looks as follows when it is first displayed on the page:

- Level1-1



+ Level1-2

+ Level1-3

Thanks in advance!

chava bernstein

You can open a branch using openItem method:


function doAfterLoading(){



Or you can define opened rows directly in the xml by open=“1” attribute:

Is the itemId the same thing as the rowId?

Yes, it is.