This question is locked. New answers and comments are not allowed.
Hello, I have a problem with displaying and editing Doubles. On first load things are fine, I get a nicely formatted currency, with the correct (Dutch) separator ",". However as soon as I make an Ajax postback or press Edit, the Dutch localization is lost. Then I get a "." separator. Clientside validation will now only accept values with a "." separator, but serverside a "," separator is expected, leading to a null value. Is this a bug or am I missing something?
View example:
<%--not passing in Model will lead straight to an ajaxbound grid, without
the correct localization (in my (Dutch) case will show 150.99 instead of (the correct value) 150,99.
Passing Model will now only cause the localization to be correct on the first load.
After, for example, sorting Dutch localization is lost.
Formatting is lost as well, but I believe that is a known issue.
--%>
<%= Html.Telerik().Grid<Mvc2Application.Models.OrderViewModel>(Model)
.Name("Grid")
.DataKeys(keys =>
{
keys.Add(o => o.OrderID);
})
.Columns(columns =>
{
columns.Bound(o => o.OrderID);
columns.Bound(o => o.OrderDate);
columns.Bound(o => o.ShipAddress);
columns.Bound(o => o.TestAmount).Format("{0:C}");
columns.Command(commands =>
{
commands.Edit();
}).Width(180);
})
.Sortable()
.Localizable("nl-NL")
.DataBinding(dataBinding => dataBinding.Ajax()
.Select("Select","Home")
.Update("Update", "Home")
)
.Filterable()
.Pageable()
%>
<% Html.Telerik().ScriptRegistrar().Globalization(true); %>