Hello,
By dragging a column, which is added to a certain group, into the GroupByBox, only the header of the column is shown in the button of the box. Because some columns added to different groups have the same header, I need to show the headers of the column and its group in the button of the box in order to differentiate the columns.
The event "AfterColPosChanged" isn't fired when dropping into the GroupByBox ... is there any other suitable event, where I can manipulate the header of the column?
Hi Manni,
Grouping is tightly linked with sorting. So AfterSortChange will fire when you group or ungroup a column. So you could change the column caption inside that event.
Hi Mike,
thanks for your answer. Being able now to manipulate the header of the grouped column it reveals to be a rather tedious work:
I'm looking for a not so complex way to attach the group headers to the column headers in the GroupByBox, e.g. by adressing the buttons of the box directly ...
Do you have an idea?
The simplest way to do this would be to use AfterSortChange and loop through all of the columns in the band. On each band, you can check the IsGroupByColumn property. Then you can set the caption of the column based on whether it's true (in which case you would add the group caption) or false (in which case you would just use the regular caption).