|
|
|
|
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.
Subject |
Author |
Date |
|
Eric Houvenaghel
|
Oct 27, 2009 - 12:57 PM
|
In the Report Grid, I am wondering if there is a good way of doing the following:
Basically, we would like the cell comparison, when grouping, to be based on one format.
And the comparison, when sorting, to be based on a second format.
This would be very easy to do if I knew what action triggered the ReportSortOrderUpdate (i.e. grouping or sorting).
I could then put an if statement in the cell’s TextGet method which is used by the Compare method:
if(IsGrouping) {
// Use grouping format.
...
}
else {
// Use sorting and filtering format.
...
}
Here is what we would like to see after grouping:
|
|
Technical Support
|
Oct 30, 2009 - 2:36 PM
|
We added the following comparison reason enumeration and virtual method into the CExtGridCell class:
enum e_grid_cell_comparison_type_t
{
__EGCCT_UNKNOWN = -1,
__EGCCT_CELL_CLASS_OPERATOR_EQUALITY = 0,
__EGCCT_CELL_CLASS_OPERATOR_INEQUALITY = 1,
__EGCCT_CELL_CLASS_OPERATOR_LESS = 2,
__EGCCT_CELL_CLASS_OPERATOR_LESS_OR_EQUAL = 3,
__EGCCT_CELL_CLASS_OPERATOR_GREATER = 4,
__EGCCT_CELL_CLASS_OPERATOR_GREATER_OR_EQUAL = 5,
__EGCCT_GENERIC_GRID_SORTING = 6,
__EGCCT_TREE_GRID_SORTING = 7,
__EGCCT_REPORT_GRID_GROUPING = 8,
__EGCCT_FORMULA_ATOM_COMPUTATION = 9,
__EGCCT_PROPERTY_GRID_EMPTY_MIXED_STATE_DETECTION = 10,
__EGCCT_PROPERTY_GRID_MODIFIED_STATE_DETECTION = 11,
};
virtual int CompareEx(
e_grid_cell_comparison_type_t eGCCT,
const CExtGridCell & other,
DWORD dwStyleMask = __EGCS_COMPARE_MASK,
DWORD dwStyleExMask = __EGCS_EX_COMPARE_MASK,
LPARAM lParamCompareEx = 0L // user defined value
) const;
By default, the into the CExtGridCell::CompareEx() method simply invokes the CExtGridCell::Compare() method. But all the sort-able algorithms in all the Prof-UIS grids are invoking the CExtGridCell::CompareEx() method. You can drop us an e-mail to the support mail box at this web site and we will provide you with the source code update download information.
|
|
Eric Houvenaghel
|
Oct 27, 2009 - 2:55 PM
|
Yes CExtGridCell::CompareEx() would be nice. Would this be in 2.87? When do you expect 2.87? Thanks
|
|
Technical Support
|
Oct 27, 2009 - 2:32 PM
|
Thank you for the interesting version. The CExtGridCell::Compare() virtual method is used both for sorting and grouping in the report grid control. This virtual method is invoked for all the grid cells. You can create your own date/time grid cell which implements this virtual method. Your grid cell class should know pointer to the report grid control. This will let it to query the report grid for the sorting/grouping rules and choose the comparison type. This approach will work, but we think it’s not effective and may be really slow. So, we think your question is the feature request for implementing the new CExtGridCell::CompareEx() virtual method. This new virtual method should be similar to the existing CExtGridCell::Compare() method. The new method should have an additional DWORD dwComparisonFlags parameter and the report grid should let the method information about whether the comparison is invoked for sorting or grouping.
|
|