After the last update kendo ui web (2013.1.514) i get the error for the decimal type value.
Here are a few lines of code:
Site.Master
View
Model
Edit template
Global.asax
When i try to submit this form i get validation error
Order_Weight is not valid.
I also notated that is success in IE9 (in IE10, Opera e FF work fine).
Here are a few lines of code:
Site.Master
<script src="<%= Url.Content("~/Scripts/kendo/2013.1.514/jquery.min.js") %>"></script> <script src="<%= Url.Content("~/Scripts/kendo/2013.1.514/kendo.all.min.js") %>"></script> <script src="<%= Url.Content("~/Scripts/kendo/2013.1.514/kendo.aspnetmvc.min.js") %>"></script> <script src="<%= Url.Content("~/Scripts/kendo/2013.1.514/cultures/kendo.culture.ru-RU.min.js") %>"></script> <script src="<%= Url.Content("~/Scripts/kendo.modernizr.custom.js") %>"></script> <script type="text/javascript"> //set culture of the Kendo UI kendo.culture("ru-RU"); </script> <a title="Сохранить (Ctrl + S)" class="k-button k-button-icontext" href="#" onclick="orderEditControlAction()" data-role="save"><span class="k-icon k-update"></span>Сохранить</a><form id="formOrderEdit" method="post"> <%:Html.HiddenFor(m => m.OrderId) %> <%:Html.LabelFor(m => m.Order_Weight) %> <%:Html.EditorFor(m => m.Order_Weight) %> <%:Html.ValidationMessageFor(m => m.Order_Weight) %></form><script type="text/javascript"> var validator = null; $(document).ready(function () { validator = $("#formOrderEdit").kendoValidator().data("kendoValidator"); }); function orderEditControlAction() { if (validator.validate()) { $.ajax({ cache: false, type: "POST", url: "/Order/save", data: $('#formOrderEdit').serialize(), success: function (response, textStatus, jqXHR) { //... }, error: function (data) { alert("Ошибка при выполнении сохранения!"); } }); } return false; }</script>public class OrderEditViewModel{ [ScaffoldColumn(false)] Guid OrderId { get; set; } [DisplayName("Кол-во изделий в тоннах")] [UIHint("NumberDecimal")] decimal? Order_Weight { get; set; }}<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<decimal?>" %><%: Html.Kendo().NumericTextBoxFor(m => m) .Decimals(3) .Format("N3") .Step(0.001m) .Min(0) .HtmlAttributes(new { style = "width:100%" })%>Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("ru-RU");Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("ru-RU");System.Web.Mvc.ModelBinders.Binders.Add(typeof(decimal?), new CultureAwareDecimalModelBinder());When i try to submit this form i get validation error
Order_Weight is not valid.
I also notated that is success in IE9 (in IE10, Opera e FF work fine).