BCGControlBar Pro for MFC
void CBCGPGridCtrl::ExpandAll ( BOOL  bExpand = TRUE)

Expands or collapse all grid items containing any sub-items.

Parameters
bExpandTRUE - expand items; FALSE - collapse items.