Culture problem

6 posts, 1 answers
  1. Nucleo
    Nucleo avatar
    13 posts
    Member since:
    Aug 2012

    Posted 17 Oct 2012 Link to this post

    Hello,

    I'm using a TreeListView with some Decimal columns. The problem is that I'm in Brazil, and here the decimal separator is the comma, unlike USA, where they use the period. When I put a decimal value on my columns it's showed with the USA separator.

    I'm using the CellEditEnded event to control my changes, but when I edit the cell with a value, for example 12.50, but don't change it, the value of my cell become 12500.

    So I have e.OldData = 12.50 and e.NewData = 12500 even if I don't change a thing.

    Could you please check it out?

    Thanks in advance.

  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 18 Oct 2012 Link to this post

    Hello,

    If the decimal separator for your language is comma ",", then you should use it. Please take a look at this forum thread where you could find a discussion about the decimal separators.

    All the best,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. Nucleo
    Nucleo avatar
    13 posts
    Member since:
    Aug 2012

    Posted 23 Oct 2012 Link to this post

    Hello,

    Fisrt of all, thanks for answering!

    I read the forum thread, but my problem is quite different. There the guy wants to use both decimal separators (comma and dot) at his project. My problem is that my Telerik component is not getting the right separator from my defined Culture. I mean that it does not show the right separator and, when it goes to the server, it goes without separator at all. So when it's showed 12.50 on my cell, it goes 12000.00 to the server.

    Thanks for your attention.
  5. Answer
    Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 23 Oct 2012 Link to this post

    Hello,

    Thank you for clarifying.

    Now the Culture used for formatting the GridView is the one specified as a Language for it or for the containing Window. We have changed the behaviour of the GridView concerning culture settings to be consistent with the ones for the DataGrid. You should set the Language property to be the CurrentCulture and the GridView will be formatted based on it.

    You could check this help article for a reference.

    Kind regards,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. Nucleo
    Nucleo avatar
    13 posts
    Member since:
    Aug 2012

    Posted 25 Oct 2012 Link to this post

    Thanks! It completely solved my problem!

  7. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 08 Feb 2013 Link to this post

    Hello,

    In addition to my last answer, I would like to inform you that we have introduced a new property IsLocalizationLanguageRespected of the RadGridView. It is available in our latest internal build. 

    Its default value is 'true' meaning that the formatting will be based on the Language property (default behaviour). Once you set it to 'false", then the CurrentCulture will be respected. 

    Regards,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
DevCraft banner