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 » How can I 'lock' some columns in CExtReportGridWnd? Collapse All
Subject Author Date
Eric Nov 16, 2010 - 12:10 PM


The idea is to ’lock’ some columns on the left of the grid, so they are always visible when you are scrolling horizontally.

These columns should have exactly the same behavior than the normal ones but should always be visible.

So, I need to keep the sorting, grouping and the text filter on these columns and possibly having the same look.

Is there an easy way to implement this feature, maybe by using the ’OuterColumnCountLeftSet()’ function?

Thanks in advance.

Technical Support Nov 18, 2010 - 5:27 AM

We agree the current version of the frozen columns is mostly designed for the CExtGridWnd plain grid control. It requires some adjustments when applied to the CExtTreeGridWnd / CExtReportGridWnd controls. The CExtGridBaseWnd::OnGbwAnalyzeCellMouseClickEvent() virtual method should be implemented to create custom expand buttons of group rows. The column header drag-n-dropping feature looks like incompatible by design with the frozen columns feature. Or, at least, drag-n-dropping should not be enabled for frozen columns and normal columns should not be dropped between frozen. We need more details about your task. Why do you need both frozen columns and report grid?

Technical Support Nov 17, 2010 - 2:54 AM

This feature is called frozen columns/rows. You should use void CExtGridBaseWnd::Frozen***() methods to mark the required number of columns and/or rows as frozen. There are two test projects available:

Eric Nov 17, 2010 - 2:55 PM


I tried this feature today and it is really great but I have nevertheless some issues mainly while grouping.

As I explained in my first post, I want to use this feature in ReportGrid.

I don’t like the fact that the text in group rows doesn’t start from the beginning but just after the last frozen column. Is it possible to have the same behavior than when we have no frozen columns? That is to say, text of group rows starting at the beginning of grid and adding indentation for each new grouping? If that is possible, I think that the expand button would be available again, right?

If not, I know that I can manage the place where is displayed the text in group rows by overriding the ’OnReportGridPaintGroupRow’ method and the place where is displayed the expand button by overriding the ’OnTreeGridPaintExpandButton’ method. But If I do that, the expand button doesn’t work any more. Clicking on it, nothing happens. I think it is because you are detecting where the click occurs and you do the association thanks to the indentation you insert with each new grouping. Is there a way to override or change that behavior? Can I paint the expand button where I want on the row but having nevertheless a button that works?

Finally, I have maybe found a bug. If you do a Drag&Drop of a frozen column and if the new frozen column has a smaller size, a blank column appears. This one disappears as soon as a redraw occurs so with a resize for example.


PS : I use Prof-UIS 2.87. Since which version this feature is available in ReportGrid?