We would like to initialise our tree grid with all the rows expanded. I see there is an expanded property on Grid.data.GridRowModel however it is just a getter.
In the Tree Grid example in the documentation, the data is set with rows that have expanded set to true. I can't find this property documented anywhere besides that example.
Okay, so using myRecord.expanded = true; fails because we're trying to set a getter. But myRecord.data.expanded = true; seems to work so long as we do that before inserting the record into the store. Does that seem reasonable?
Yes, the expanded field lets you set the expanded value in the data you load. I recommend against writing any code using record.data since it's a private member.
It sounds more fitting in your case to simply call expandAll after loading IMHO.
I was afraid that would be the case. I guess we will use the expandAll instead.
It would be great if there was a way of setting the default expand/collapse state on the model itself, perhaps a static property called initiallyExpanded?