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 » Several questions about the CExtReportGridWnd control! Collapse All
Subject Author Date
Bangjun Lei Oct 15, 2007 - 2:14 PM

Dear Sir./Madam.,

I created a CExtReportGridWnd in my program. Now I want to carry out some actions on it. Could you teach me?
1. Every time when I click the header the header reacts by being pressed down and showing a dialog saying "You cannot sort ..column." How to prevent any actions from happening when clicking at the header?
2. I want to process the message when the user clicks a cell. How to do this?

Thanks!

Suhai Gyorgy Oct 16, 2007 - 2:17 AM

1. By default, users can sort and group a reportgrid by every column. You can disable this column by column, with the following code:
CExtReportGridColumn * pRGC = ...;
pRGC->GroupingEnabledSet( false );
pRGC->SortingEnabledSet( false );

If you don’t want to see the above mentioned message popping up, you need to override CExtReportGridWnd::OnReportGridSortOrderVerificationFailed method and leave its body empty.

2. Override OnGbwAnalyzeCellMouseClickEvent method of Reportgrid. It is called every time any of the mouse buttons is clicked over the grid. Testing its parameters can tell you which mouse button was clicked, how many times (doubleclick), and whether it was clicked over a cell or not. Check Out Help on this method to find out more.