Hi,
One of the field in my datagrid is number (lets call it Severity, having numbers to represent a severity level). I am ControlTemplating CellValuePresenter of this field to display a color and text instead of number in cells of that field.
When this field is grouped. That number is displayed in the header of group. What should I do to template the header of that group to display color and text instead of that number.
Your help will be much appreciated.
Thanks,
Imad.
Hello Imad,
Since there is virtualization of the GroupByRecordPresenters, this behavior is expected, so I have created a sample project for you, where I retempalted the GroupByRecordPresenter and used Converters to change the values. You can use you own logic and add the Ellipse.
Hope this helps you.
Hi Stefan,
I formatted the groupby header description the way you suggested in GroupByRecordPresenter_Loaded event.
But now the problem is if there is a column already grouped lets say column 'A' and I group my column lets say 'B' after that (for which I want custom description) and then I remove column 'A' from group pane, group header description of column 'B' again gets hotch-potch.
How should I fix that?
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
Thanks Stefan for quick reply. Description and DescriptionWithSummaries Properties contain same text. They wouldn't be helpful. I can use Value property which contains only description.
The GRoupByRecordPresenter’s Record Property can be cast to GroupByRecord, which has Description and DescriptionWithSummaries Properties which you can use to get the Summaries and Description.