Wrong month names and date format for DateTimeGroupDescription

10 posts, 0 answers
  1. Jan Białokozowicz
    Jan Białokozowicz avatar
    7 posts
    Member since:
    Jan 2010

    Posted 29 Aug 2013 Link to this post

    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.
  2. Jan Białokozowicz
    Jan Białokozowicz avatar
    7 posts
    Member since:
    Jan 2010

    Posted 29 Aug 2013 Link to this post

    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
  3. DevCraft banner
  4. Jan Białokozowicz
    Jan Białokozowicz avatar
    7 posts
    Member since:
    Jan 2010

    Posted 02 Sep 2013 Link to this post

    Can i get some official statement about this issue ?
  5. Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 02 Sep 2013 Link to this post

    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 >>
  6. Jan Białokozowicz
    Jan Białokozowicz avatar
    7 posts
    Member since:
    Jan 2010

    Posted 22 Oct 2013 Link to this post

    Are there any changes in this topic ?
    Greetings
  7. Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 25 Oct 2013 Link to this post

    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 >>
  8. Zlatko
    Zlatko avatar
    5 posts
    Member since:
    Sep 2013

    Posted 26 Feb Link to this post

    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.

  9. Polya
    Admin
    Polya avatar
    199 posts

    Posted 01 Mar Link to this post

    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
  10. Zlatko
    Zlatko avatar
    5 posts
    Member since:
    Sep 2013

    Posted 09 Mar in reply to Polya Link to this post

    Hello Polya

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

  11. Polya
    Admin
    Polya avatar
    199 posts

    Posted 11 Mar Link to this post

    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.
Back to Top
DevCraft banner