Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » To check "Group By" Property Collapse All
Subject Author Date
Nitin Gahlaut Jul 21, 2010 - 8:16 AM


How can i check whether "Group by" is enabled/activated for any column on grid corntol.


Thanks & Regards



Technical Support Jul 21, 2010 - 8:48 AM

Here is the code snippet demonstrating how to check whether report grid is grouped:

CExtReportGridWnd * pRGW = . . .
CExtReportGridSortOrder & rgso = pRGW->ReportSortOrderGet();
LONG nCountOfGrouppingColumns = rgso.ColumnGroupCountGet();
bool bReportGridIsGroupped = ( nCountOfGrouppingColumns > 0L ) ? true : false;

Please note, the CExtReportGridWnd class is derived from the CExtTreeGridWnd class. The CExtReportGridItem* pointers can be used as HTREEITEM tree row handles in invocations of the CExtTreeGridWnd class methods. If the report grid control is NOT grouped, then all the tree rows are leaf rows without children. Only the group rows in the report grid control contain children rows. The group rows are completely re-created during re-grouping. I.e. HTREEITEM handles and CExtReportGridItem* pointers of all the group rows are NOT permanent. The data row handles and CExtReportGridItem* pointers are permanent and your app can keep them for using in particular methods.