Professional UI Solutions
Site Map   /  Register
 
 

Forum

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 Tech Support » CExtReportGridWnd -- showing group rows Collapse All
Subject Author Date
Dave Calkins Jun 21, 2007 - 11:12 AM

We’re using CExtReportGridWnd and are grouping on one of the columns (using ReportSortOrderGet(), CExtReportGridSortOrder::ColumnInsert(), and ReportSortOrderUpdate()).

This works, in that the items are correctly grouped according to the grouping column.

However, the group rows (as seen in the ReportGrid sample) are not shown.

How do we turn on display of the group rows so that there is some separation between the groups?

Technical Support Jun 22, 2007 - 8:52 AM

The CExtReportGridSortOrder class describes both sorting and grouping rules for the CExtReportGridWnd class. The report grid’s sort order in your case contains one column for sorting. The number of columns for grouping should be less than or equal to the number of columns for sorting. You may simply have forgotten to specify the number of columns for grouping after invoking CExtReportGridSortOrder::ColumnInsert(). So just call the CExtReportGridSortOrder::ColumnGroupCountSet() method and specify 1 in its parameter.

Dave Calkins Jun 22, 2007 - 9:53 AM

Thanks for the reply! Calling ColumnGroupCountSet(1) fixed the problem, causing the group rows to be displayed.

Technical Support Jun 22, 2007 - 10:25 AM

By overriding CExtReportGridWnd::OnReportGridPaintGroupRow() you can repaint group rows exactly as you need. Please let us know if you need any help on this.