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

[Solved] GridViewDataColumn doesn't honour current culture in EditMode

1 Answer 77 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Tomas
Top achievements
Rank 1
Tomas asked on 08 Oct 2010, 01:22 PM

Hi,

I have a RadGridView and one of the columns is bound to a floating-point value like this:
<telerik:GridViewDataColumn DataMemberBinding="{Binding MyFloatProperty}" />

In DisplayMode the value is displayed correctly, according to the current culture's settings (with comma as an separator).
However when I switch to EditMode and enter 1,5 it translates to 15 when going back to DisplayMode. If i instead enter 1.5 and switch back to DisplayMode then it's correctly displayed as 1,5.

Thanks in advance

Tomas

1 Answer, 1 is accepted

Sort by
0
Tomas
Top achievements
Rank 1
answered on 11 Oct 2010, 09:10 AM
Hi again!

I found the answer to my question on these two sites:
http://blogs.imeta.co.uk/jyoung/archive/2009/10/02/771.aspx
http://msdn.microsoft.com/en-us/library/cc838238(VS.95).aspx

You have to set the Language property of the frameworkelement as well in order to get Silverlight to parse the text back to the appropriate type correctly. The Language property is inherited so you can put this in your RootVisual Control.

Tomas
Tags
GridView
Asked by
Tomas
Top achievements
Rank 1
Answers by
Tomas
Top achievements
Rank 1
Share this question
or