Open NingMengMeng opened 5 years ago
No, still not possible, but you can easily do this in grid.onLoad -> event.done
// expand all records with children recursively
var do_expand = true;
while ( do_expand ) {
var records_count = grid.records.length;
grid.records.forEach( ( rec ) => {
if ( rec.w2ui && rec.w2ui.children ) {
grid.expand( rec.recid, true );
}
} );
do_expand = ( records_count !== grid.records.length );
}
grid.refresh()
Notice the second parameter to grid.expand (noRefresh) that has recently been added in PR #2146 and that helps to speed this up.
Can Tree-Like Grid be loaded and all expanded by default?