Expanding all rows on a self referencing grid hierarchy

Is it possible to somehow expand all rows when loading data?
I was looking at this example (Blazor DataGrid self-reference hierarchy) and tried to call grid.ExpandRows(allItems); but it didn't do anything?

Should I just iterate somehow thru the grid one by one? I also tried to expand inside RowRender (by calling grid.Expand(args.Data)) but that didn't seem to work either.

Seems to be working if I call grid.ExpandRows on all parents then call grid.ExpandRows on the second tree level and once more grid.ExpandRows on the tried level of the tree. It takes long time to load :frowning_face:.

Shouldn't take a long time because the whole list is loaded to memory.

Edit: optimised a bit third level is not necessary to expand because 3rd level is not expandable.