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

Culture problem

5 Answers 74 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nucleo
Top achievements
Rank 1
Nucleo asked on 17 Oct 2012, 05:19 PM
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.

5 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 18 Oct 2012, 11:00 AM
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.

0
Nucleo
Top achievements
Rank 1
answered on 23 Oct 2012, 12:50 PM
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.
0
Accepted
Dimitrina
Telerik team
answered on 23 Oct 2012, 02:01 PM
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.

0
Nucleo
Top achievements
Rank 1
answered on 25 Oct 2012, 11:37 AM
Thanks! It completely solved my problem!

0
Dimitrina
Telerik team
answered on 08 Feb 2013, 04:24 PM
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.

Tags
General Discussions
Asked by
Nucleo
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Nucleo
Top achievements
Rank 1
Share this question
or