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 allows hiding of all columns Collapse All
Subject Author Date
Adam Keadey Apr 2, 2008 - 4:39 AM

The report grid will allow you to remove all the columns from the grid.  With the columns removed there is no way to add any columns back since the right click on the columns is how you get the contect menu for add, revmove, ...


First of all this seems like an oversight in Prof-uis and should be addressed if not already.


Second is there a way to stop the last column from being hidden or a way to stop s specific column from being hidden.


I have tried to disable drop/drag and when you use the group by box it you can no longer drop/drag into and out of this box so this really is not an option.

Technical Support Apr 3, 2008 - 12:43 PM

The following method of the CExtReportGridWnd class is invoked to activate or deactivate a column:

      virtual bool ReportColumnActivate( // default parameters will activate/deactivate all the columns
            __EXT_MFC_SAFE_LPCTSTR strColumnName = NULL,
            __EXT_MFC_SAFE_LPCTSTR strCategoryName = NULL,
            bool bActivate = true,
            LONG nColNo = -1L, // -1L - activate last
            bool bRedraw = true
            );
You can override it in your CExtReportGridWnd-derived class and check whether the deactivated column is the last active column. If it’s the last, then your method should simply return false. If not, then it should invoke the parent class method. The CExtReportGridWnd::ReportColumnGetCount() method returns the number of active and/or inactive columns.