property for LocalDataSourceProvider is also available with the Q2 2014 release
of Telerik UI for WPF.
Setting it allows displaying the data for all DateTimeGroupDescriptions in the correct culture - "May 2016" is "Май 2016" (in "bg-BG" culture). Also the dates are grouped into different weeks depending on the Calendar from the set Culture
For more information you can refer to this help article: http://docs.telerik.com/devtools/wpf/controls/radpivotgrid/features/localdatasourceprovider/culture-support.html
and check the Localization
example from our QSF demos: http://demos.telerik.com/wpf/
The culture support affects the DateTimeGroupDescriptions
and the PropertyAggreagateDescriptions
formatting. However, it is not applied for the PropertyGroupDescriptions
as these descriptions can be created for all types of data and this data is displayed and compared as an IComparable type (in most cases).
That said, in order to create a date specific PropertyGroupDescription
I suggest the following approach:
1) Create a custom PropertyGroupDescriptionBase and in its overriden GroupNameFromItem
method return the "item" parameter using the DateTime.ToString(<description's Culture property>)
2) Create a custom GroupComparer
that will parse the date strings from 1) (using the same culture) back to DateTime objects which will allow correct comparison.
3) Add handler to the LocalDataSourceProvider.PrepareDescriptionForField event and use your custom description (from 1) ) instead of the PropertyGroupDescription generated for the date fields.
I've prepared a sample project demonstrating this approach. Please find it attached.
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer
and share your thoughts.