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 Tech Support » CExtReportGridWnd Disable Grouping Collapse All
Subject Author Date
Adam Keadey Jun 8, 2007 - 10:18 AM

I would like to dynamically disable the grouping all together in the CExtReportGridWnd. If this is not possible is there a style at startup that will disable the grouping alltogether.

It needs to basically remove the grouping options from the context menu so the group area cannot be shown and a column can not be set to grouping.

Technical Support Jun 8, 2007 - 12:35 PM

Here are the steps:

1) Hide the group-by-box using CExtReportGridWnd::ReportGroupAreaShow();
2) Prevent the relating menu commands by overriding CExtReportGridWnd::OnReportGridColumnCtxMenuConstruct(). In this overridden method, first call CExtReportGridWnd::OnReportGridColumnCtxMenuConstruct() of the parent class method to let it construct the default context menu and then remove the unwanted commands from it.