The IMAPITable::ExpandRow method expands a collapsed table category, adding the leaf rows belonging to the category to the table view.
HRESULT ExpandRow(
ULONG cbInstanceKey,
LPBYTE pbInstanceKey,
ULONG ulRowCount,
ULONG ulFlags,
LPSRowSet FAR * lppRows,
ULONG FAR * lpulMoreRows
);
The IMAPITable::ExpandRow method expands a collapsed table category, adding the leaf rows that belong to the category to the table view. A limit to the number of rows to be included in the expanded category can be specified in the ulRowCount parameter. When ulRowCount is set to a value greater than zero and one or more rows are returned in the row set pointed to by lppRows, the position of the bookmark BOOKMARK_CURRENT is moved to the row immediately following the last row in the row set.
When ulRowCount is set to zero, requesting that zero leaf rows be added to the category, or zero rows are returned because there are no leaf rows in the category, the position of BOOKMARK_CURRENT is set to the row following the row identified by pbInstanceKey.
Do not generate notifications on rows that are added to a table view due to category expansion.
The number of rows in the row set pointed to by the lppRows parameter might not equal the number of rows that were actually added to the table, the entire set of leaf rows for the category. Errors can occur, such as insufficient memory, or the number of rows in the category exceeding the number specified in ulRowCount parameter. In either case, BOOKMARK_CURRENT will be positioned at the last row returned. To immediately retrieve the rest of the rows in the category, call IMAPITable::QueryRows.
Do not expect to receive a table notification when a category changes its state. You can maintain a local cache of rows that can be updated with every ExpandRow or CollapseRow call.
For more information about categorized tables, see Sorting and Categorization.