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

Wrong month names and date format for DateTimeGroupDescription

11 Answers 230 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Jan Białokozowicz
Top achievements
Rank 1
Jan Białokozowicz asked on 29 Aug 2013, 11:17 AM
When i use DateTimeGroupDescription in "Row Label" i get english month names and dateformat - but i need values for my local culture (pl-PL - Polish - it is set in my application).
(As seen in attached image)

What i need to change to get correct values ?

Greetings.

11 Answers, 1 is accepted

Sort by
0
Jan Białokozowicz
Top achievements
Rank 1
answered on 29 Aug 2013, 12:27 PM
My little research from digging to your source code: 
You use CultureInfo.InvariantCulture when converting values. As i understand this is kinda temporary or not final solution (you could at least use CultureInfo.CurrentCulture or something like that).

I also understand that i use hotfix version (RadControls_for_Silverlight5_2013_2_0827_DEV_hotfix) :) - as you mentioned without support :-).

I want to know what i need to change. I would be the best to change something in my code - not your (i dont want to use custom-build assemblies).

Greetings
0
Jan Białokozowicz
Top achievements
Rank 1
answered on 02 Sep 2013, 06:46 AM
Can i get some official statement about this issue ?
0
Rosen Vladimirov
Telerik team
answered on 02 Sep 2013, 03:53 PM
Hi Jan,

With the current release, the only way to achieve this is by using custom property group description. You can implement the logic by inheriting PropertyGroupDescriptionBase. Of course, we'll provide a permanent solution in the future, but I cannot give you exact timeframe. Most probably we will not be able to fix this for the upcoming 2013 Q3 release, as we have some other higher priority tasks.

We are really sorry for the caused inconvenience. Feel free to contact us in case you have any problems or concerns.

Regards,
Rosen Vladimirov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Jan Białokozowicz
Top achievements
Rank 1
answered on 22 Oct 2013, 09:26 AM
Are there any changes in this topic ?
Greetings
0
Rosen Vladimirov
Telerik team
answered on 25 Oct 2013, 07:05 AM
Hi Jan,

We are currently considering this change and we'll target it for our next service pack release. Hopefully this timeframe is acceptable for you.

Regards,
Rosen Vladimirov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Zlatko
Top achievements
Rank 1
answered on 26 Feb 2016, 09:20 AM

Hi Rosen

Today is 26.02.2016 or 02/26/2016 by Telerik Pivot CultureInfo :)

And this issue still not fixed.

I want to change Date Row Label from MM/dd/yyyy to dd.mm.yyyy or CultureInfo.CurrentCulture

My PC used Bulgarian Date Time format, and when I want to enter Label Filter, is between want from me bg_BG format and Telerik UI showed in InvariantCulture.

See attached file.

0
Polya
Telerik team
answered on 01 Mar 2016, 02:16 PM
Hello Zlatko,

With our Q2 2014 release of Telerik UI for Silverlight we've introduced the Culture property for the LocalDataSourceProvider which allows displaying Month names, currency symbols and number separators in the desired culture.

You can find more information in our help documentation: http://docs.telerik.com/devtools/silverlight/controls/radpivotgrid/features/localdatasourceprovider/culture-support.html and take a look at our QSF example: http://demos.telerik.com/silverlight/#PivotGrid/Localization

Regards,
Polya
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Zlatko
Top achievements
Rank 1
answered on 09 Mar 2016, 09:19 AM

Hello Polya

I forgot to say - I'm using Telerik UI for WPF, not for Silverlight

0
Polya
Telerik team
answered on 11 Mar 2016, 11:12 AM
Hello Zlatko,

The Culture 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>) method.
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.

Regards,
Polya
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Zlatko
Top achievements
Rank 1
answered on 07 Aug 2018, 12:26 PM

Hi Polya

from "Localization example from our QSF demos: http://demos.telerik.com/wpf/ " I've got errors:

1. See attached file 01.PNG

2. Log file:

--------------------------------------------------------------------------------
The following properties have been set:
Property: [AdminUser] = true {boolean}
Property: [InstallMode] = HomeSite {string}
Property: [ProcessorArchitecture] = AMD64 {string}
Property: [VersionNT] = 6.2.0 {version}
Running checks for package 'Windows Installer 4.5', phase BuildList
Looking up path for special folder 'WindowsFolder'
Running check with folder 'C:\Windows\System32' and file 'msi.dll'
Attempting to find file 'C:\Windows\System32\msi.dll'
File version is '5.0.15063.966'
Setting value '5.0.15063.966 {version}' for property 'VersionMsiDll'
The following properties have been set for package 'Windows Installer 4.5':
Property: [VersionMsiDll] = 5.0.15063.966 {version}
Running checks for command 'WindowsInstaller4_5\WindowsXP-KB942288-v3-x86.exe'
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsi' and value '4.5': true
Result of checks for command 'WindowsInstaller4_5\WindowsXP-KB942288-v3-x86.exe' is 'Bypass'
Running checks for command 'WindowsInstaller4_5\WindowsXP-KB958655-v2-x86-ENU.exe'
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsiDll' and value '4.5.6001.22299': true
Result of checks for command 'WindowsInstaller4_5\WindowsXP-KB958655-v2-x86-ENU.exe' is 'Bypass'
Running checks for command 'WindowsInstaller4_5\WindowsServer2003-KB942288-v4-x86.exe'
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsi' and value '4.5': true
Result of checks for command 'WindowsInstaller4_5\WindowsServer2003-KB942288-v4-x86.exe' is 'Bypass'
Running checks for command 'WindowsInstaller4_5\WindowsServer2003-KB958655-v2-x86-ENU.exe'
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsiDll' and value '4.5.6001.22299': true
Result of checks for command 'WindowsInstaller4_5\WindowsServer2003-KB958655-v2-x86-ENU.exe' is 'Bypass'
Running checks for command 'WindowsInstaller4_5\WindowsServer2003-KB942288-v4-x64.exe'
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsi' and value '4.5': true
Result of checks for command 'WindowsInstaller4_5\WindowsServer2003-KB942288-v4-x64.exe' is 'Bypass'
Running checks for command 'WindowsInstaller4_5\WindowsServer2003.WindowsXP-KB958655-v2-x64-ENU.exe'
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsiDll' and value '4.5.6001.22299': true
Result of checks for command 'WindowsInstaller4_5\WindowsServer2003.WindowsXP-KB958655-v2-x64-ENU.exe' is 'Bypass'
Running checks for command 'WindowsInstaller4_5\Windows6.0-KB958655-v2-x86.MSU'
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsiDll' and value '4.5.6001.22308': true
Result of checks for command 'WindowsInstaller4_5\Windows6.0-KB958655-v2-x86.MSU' is 'Bypass'
Running checks for command 'WindowsInstaller4_5\Windows6.0-KB958655-v2-x64.MSU'
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsiDll' and value '4.5.6001.22308': true
Result of checks for command 'WindowsInstaller4_5\Windows6.0-KB958655-v2-x64.MSU' is 'Bypass'
'Windows Installer 4.5' RunCheck result: No Install Needed
Launching Application.
URLDownloadToCacheFile failed with HRESULT '-2146697208'
Error: An error occurred trying to download 'https://demos.telerik.com/wpf/WPF%20Demos.application'.
--------------------------------------------------------------------------------

 

I'm using Windows 10.

Please help me to install demos!

 

0
Dilyan Traykov
Telerik team
answered on 10 Aug 2018, 09:08 AM
Hello Zlatko,

I'm uncertain why the error you shared is observed, but you can try to disable the Warn if changing between secure and not secure mode option, if you're using Internet Explorer as suggested here.

If you're not using Internet Explorer or the aforementioned suggestion does not work for you, what I can suggest is to check for any previous versions of the demos, uninstall them, reboot your machine and try installing them again. You can also try downloading the demos from the Windows Store.

If none of this helps, you can download the source code of the demos from your Telerik account and manually build them.

Please let me know how all of this goes.

Regards,
Dilyan Traykov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
PivotGrid
Asked by
Jan Białokozowicz
Top achievements
Rank 1
Answers by
Jan Białokozowicz
Top achievements
Rank 1
Rosen Vladimirov
Telerik team
Zlatko
Top achievements
Rank 1
Polya
Telerik team
Dilyan Traykov
Telerik team
Share this question
or