5 Answers, 1 is accepted
0
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
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")
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
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
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
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
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
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.