To expand all rows asynchronously, use the ExpandAllRowsAsync method.
To collapse all rows, use the CollapseAllRowsAsync (asynchronous) or CollapseAllRows (synchronous) method.
To expand or collapse all columns asynchronously, use the ExpandAllColumnsAsync and CollapseAllColumnsAsync methods, respectively (or the ExpandAllColumns and CollapseAllColumns methods to do this synchronously).