I have some columns in my grids where we display a nice description, rather than the "canonical" code or number in the column. However, when I group by (in the meaning of the "Group by" example) those columns, the tree nodes that result show the canonical number/code. It seems to me that they should show the displayed values, instead.
The canonical value is shown because GroupByTreeFormat is instantiated by only passing in the IColumnAccessor for the grid. Something rather more GUI-ish would have to be passed in to get the displayed values. Technically, the display converters are gotten from the config registry based upon display modes and labels, so it gets quite involved.
In our setup, we have a slightly abominable way that we can hack this in to get what we want. But, I wanted to open a discussion to see whether others think this should be done in a more official way.
Well the issue is the generic approach for group by. Technically the values that are displayed then are not of your object type, but of type GroupByObject. I started looking into this when I created the _5832_GroupByCustomTypesExample which is currently only available in the repository and not yet released with the examples.
I wasn't able to solve that issue in general easily. It is not that simple to get the display converter, as the GroupByObject is not aware of the cells that are used to group by. I guess a bigger refactoring of the whole group by solution would be necessary as it is not a trivial task.
In the example I helped myself by adding a toString() method that technically does the same as the IDisplayConverter.canonicalToDisplayValue()