This is a migrated thread and some comments may be shown as answers.

Wrong GroupHeaderTemplate

5 Answers 41 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 16 Dec 2014, 10:09 AM
Seems that GroupHeaderTemplate doesn't use the Converter set in the GroupDescription?
How can I make a template that does?

5 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 18 Dec 2014, 12:44 PM
Hello,

May I ask you to share a bit more information on what the final goal you would like to achieve is? How have you currently defined the converter and what result do you expect?

Regards,
Dimitrina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Thomas
Top achievements
Rank 1
answered on 18 Dec 2014, 01:09 PM
I have a dataset where I wan't to group by a column that consists of numbers, but I want to show there real value with the help of a converter.

My code is like this:
CollectionView view = CollectionViewSource.GetDefaultView(myGridView.ItemsSource) as CollectionView;
view.GroupDescriptions.Add(new PropertyGroupDescription("EscalationState", new Converters.EnumeratorConverter("EscalationState")));
myGridView.ItemsSource = view;

My "EnumeratorConverter" converts the numbers to texts (ie "1" is converter to "Escalated").

Problem is that it seems that the default GroupHeaderTemplate just shows the numbers regardless of the result from my converter.
(It shows "1" instead of "Escalated")
0
Accepted
Dimitrina
Telerik team
answered on 18 Dec 2014, 02:42 PM
Hi,

You can check the "Group By Formatted Value" WPF Demo on how the converter should be respected. 
If this does not work for you, I can suggest you to check the Modify the Group Row article on how to configure your own custom GroupHeaderTemplate.

Regards,
Dimitrina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Thomas
Top achievements
Rank 1
answered on 19 Dec 2014, 09:34 AM
Unfortunatly Group.Key in the "Modify the Group Row" does'nt work for me, as it doesn't use the converter from the PropertyGroupDescriptor.
I've managed to use the solution in "Group By Formatted Value". Allthough it wasn't what I wanted (cause my custom control uses the unconverter value).

Anyway, thanks for your help.
I think you should consider implimenting support for PropertyGroupDescriptor Converter in the default GroupHeader.

Best regards,
Thomas
0
Dimitrina
Telerik team
answered on 19 Dec 2014, 10:09 AM
Hello Thomas,

Thank you for sharing your feedback.

Additionally, you can help us making UI for WPF even better submitting your feedback and ideas, request a new feature or simply "like" and follow your favorite items on the XAML Feedback Portal: Feedback Portal.

Regards,
Dimitrina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
GridView
Asked by
Thomas
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Thomas
Top achievements
Rank 1
Share this question
or