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 General Discussion » Problem in CExtReportGrid? Collapse All
Subject Author Date
Gunasekaran Velu Feb 12, 2007 - 10:15 PM

hi folks

I am using CExtReportGrid and a CExtButton in one Dialog. While clicking CExtButton button i am displaying data in report grid from the database. When i right click the column header and uncheck all the columns and clicking the CExtButton button again, the duplicate data appears in the grid. I am also removing all rows in the grid when clicking the button. Please guide me how to avoid displaying duplicate data in grid while uncheck the columns (by right clicking the column header)

sasi kala Feb 28, 2007 - 1:36 AM

sir,

We are using your product professional user interface suite,but we have some problem using Reportgrid control .It works fine.
It seems the user is able to drag and drop the columns headers of grid, if we do that the columns get disappeared. This leads to problems in our program,so please give a solution. If the column headers are dragged and dropped they should not get disappeared.
Thanks

Technical Support Mar 1, 2007 - 9:36 AM

You can achieve this by overriding this method of the CExtReportGridWnd class:

      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
            );
Your method should simply return true if bActivate is false.


Suhai Gyorgy Feb 28, 2007 - 7:17 AM

CExtReportGridWnd is derived from CExtGridWnd, which can have a style called __EGBS_BSE_EX_DRAG_REMOVE_COLUMNS. In CExtGridWnd, removing this style could prevent the problem, but it seems to me that unfortunately ProfUIS doesn’t examine whether this style is set or not when handling column dragging to outside reportgrid. For now there are 2 not perfect solution to this:

- disable drag-n-drop of columns altogether by calling BseModifyStyleEx(0, __EGBS_BSE_EX_DRAG_COLUMNS, false); (but this will also disable user column reordering with the usual drag-n-drop)
- disable unregistering/removing column when dragging is over (it’s not a perfect solution, because the big X cursor will be still there while column is being dragged outside grid). For this solution, you need to make a CExtReportGridWnd-derived class and override void OnGridOuterDragOut(const CExtGridHitTestInfo & htInfo); in it, which method should do nothing (don’t call parent class’ implementation). That should do the trick.

Technical Support Feb 13, 2007 - 1:09 PM

It is hard to say what the problem is without looking at the source code. Would you send us your project or modified ReportGrid sample so that it can show what’s wrong.

Gunasekaran Velu Feb 13, 2007 - 10:12 PM

ok i will build the sample report grid project and send to u....