Search code examples
kendo-uikendo-asp.net-mvckendonumerictextbox

Kendo numeric format for SQL Server "money" data type


I'd appreciate any advice.

I use a NumericTextBox for the SQL Server datatype money:

 @Html.Kendo().NumericTextBoxFor(model => model.AMOUNT)

It displays the sum incorrectly. Like if the AMOUNT is 2000,00 in NumericTextBox it is shown as 20,000,000.00.

How to format it?


Solution

  • Use Format method:

    @Html.Kendo().NumericTextBoxFor(model => model.AMOUNT).Format("c");
    

    Use any format you want, a standard one or a custom one. Also do note the culture should be taken into account.