New to Telerik UI for ASP.NET Core? Download free 30-day trial

Formats

The NumericTextBox accepts only numeric entries and its specific format defines the conversion data type—for example, currency or percentage. You can use different formats, if you want to display a numeric specific for a particular country/region. The purpose of number formatting is to convert a Number object to a human readable string using the culture-specific settings. For setting a Format in the Telerik UI NumericTextBox for MVC and Core the "Format" property could be used.

The following example demonstrates how to render a currency NumericTextBox by using the "Format" property.

    @(Html.Kendo().NumericTextBox()
        .Name("currency")
        .Format("c")
    )
<kendo-numerictextbox name="numeric"
                      format="c">
</kendo-numerictextbox>

The following example demonstrates how to render a percentage NumericTextBox by using the "Format" property.

    @(Html.Kendo().NumericTextBox()
        .Name("percentage")
        .Format("p0")
    )
<kendo-numerictextbox name="percentage"
                      format="p0">
</kendo-numerictextbox>

More examples of the available formatting options you can find below. The runnable example in the demo represents how to format numbers by using the kendo.toString method in Kendo UI:

Number Formatting

See Also

In this article