Вопрос

I have a Kendo NumericTextbox

 @(Html.Kendo().NumericTextBoxFor(m => m.CalculationValue)
                             .Name("CalculationValue")
                             .Min(0)
                             .Max(99999999)
                             .Format("n")
                             .Decimals(2)
                          )

I'm reading a value from the database that is equal to 123.99 but the Kendo NumericTextbox is displaying the value as 123.00.

I included the relevant culture java script file for kendo.culture.en-ZA.min.js and initialized the culture

$(function () {
    kendo.culture("en-ZA");
});
Это было полезно?

Решение

I found the problem, hopefully this would help someone in future. The culture was forced in the web.config by the following line

<globalization culture="en-za" uiCulture="en-za" requestEncoding="utf-8" responseEncoding="utf-8" />

I removed this line and the problem was resolved.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top