Substitute of expandAll in TreeGrid

hi everybody,

I’ve the need to rebuild the ExpanAll function of TreeGrid because it doesn’t run with dynamic Loading.

I try:

Grid.forEachRow(function(id){
if(Grid.getLevel(id)==0) {
Grid.openItem(id);
});

In my grid i’ve 10 level0 Rows but only the last one is expanded and seems to be a timing problem because if i put a simply modal alert, alert (“hi”) after openItem, of course, i’ve to click on alert but my 10 level0 rows are expanded correctly one by one beginning from the first until the last one.
How can i do without the alert ?

Many thanks.

Unfortunately it is not available to use the expandAll() method with the dynamic loading due to the timing for loading the data. Unfortunately this limitation cannot be eliminated.