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 » Problem with the CompareEx, __EGCCT_GENERIC_GRID_SORTING and __EGCCT_REPORT_GRID_GROUPING Collapse All
Subject Author Date
Eric Houvenaghel Nov 16, 2009 - 10:21 AM

There is a slight problem with the CompareEx function.

Here is a recap of what I want to do.

For comaprison when sorting by clicking on the column header, I want to compare dates numerically.

To perform this comparison, I test for the __EGCCT_GENERIC_GRID_SORTING flag in the CompareEx function.

No problem there.

For comparison when grouping, I want a textual comparison of the dates based on a user defined format.

To perform this comparison, I SHOULD be able to test for the __EGCCT_REPORT_GRID_GROUPING flag only in the CompareEx function.

However, when grouping a column, you first recieve the __EGCCT_GENERIC_GRID_SORTING flag and some time later, your receive __EGCCT_REPORT_GRID_GROUPING.

For grouping, shouldn’t the CompareEx function only recieve the __EGCCT_REPORT_GRID_GROUPING flag?

The bug is that I get sepperate groups when they should be together.

In the image below, I want to group by year only.

Some of the cells only have a time component. They should all be grouped together but they are not.


Is this fixable on your end or not?



 

Technical Support Nov 16, 2009 - 1:46 PM

The sorting/grouping algorithm of the report grid control does it work in several steps:

1) It removes all the existing group rows. Only the data rows left.

2) It sorts the data rows by all the columns. Fist by group columns, second by sort columns. The __EGCCT_GENERIC_GRID_SORTING flag is used at this step.

3) It walks through the sorted rows and inserts the group rows where they needed. This step also requires the grid cell comparison. The __EGCCT_REPORT_GRID_GROUPING flag is used at this step.

So, if you compared several year 2007 and several year 2008 date time cells as date time values and the step 2, then they sorted correctly: all the year 2007 rows are near each other and all the year 2008 rows are also near each other.
Then, at the 3rd step, you should did a different comparison. Your date time cell class should compare years only to let the report grid to group its rows by year only. Additionally, the report data rows under each year group row will be correctly sorted ascending or descending by entire date value. This is absolutely correct and the 2nd step is really needed for that.

Please provide us with the source code of your date time cell class and we will test it.