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

Decimal comma separator not using globalization in edit mode

1 Answer 80 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
arnorgauti
Top achievements
Rank 1
arnorgauti asked on 17 Apr 2012, 10:15 AM
Hi

I've been running into problem. I have to edit a decimal number in grid and my localization which is Icelandic (is-IS) the decimal numbers are in "34,5" format .. not 34.5

On grid the number is displayed as "34,5" but when i edit current line is displays as "34.5", but the validation engine know that that´s not the correct format and writes out an validation message.

"Field duration must be an number"

Here is a video screencast that i demonstrate my problem.

http://screencast.com/t/Bg4Mhapn 

1. In grid view i use:

.Localizable("is-IS")

2. In web config i have:

<globalization culture="is-IS" uiCulture="is-IS"/>

3. In _Layout.cshtml (masterpage) i have

@(Html.Telerik().ScriptRegistrar().Globalization(true).DefaultGroup(group => group.Combined(true).Compress(true)))

Sincerly
arnor

1 Answer, 1 is accepted

Sort by
0
arnorgauti
Top achievements
Rank 1
answered on 17 Apr 2012, 10:16 AM
I managed to displayed Decimal number with , comma separator (My culture) when i created a EditorTemplate for Decimal which i called Decimal.cshtml

But when i click on the textbox, i get a decimal number 9.3 instead of 9,3 and the validation writes out.

Here is another video which shows this behaviour:

http://screencast.com/t/lqh3lttXsz1 

Sincerly
arnor
Tags
Grid
Asked by
arnorgauti
Top achievements
Rank 1
Answers by
arnorgauti
Top achievements
Rank 1
Share this question
or