title | page_title | description | slug | tags | res_type |
---|---|---|---|---|---|
Override the number formats in a culture |
Substitute the culture delimiters in the numbers. |
Learn how to change Telerik UI for {{ site.framework }} culture number delimiters. |
culture-override-settings |
culture, numeric, numbers, override, numberFormat, currency, percent |
kb |
Product | Progress {{ site.product }} Grid |
Progress {{ site.product }} version | Created with the 2023.2.829 version |
How can I override the numeric delimiters for {{ site.product }} culture?
To achieve the desired scenario add a script which extends the numeric options for the culture:
<script>
var customUS = $.extend(true, {}, kendo.culture(), {
name: "custom-US",
numberFormat: {
",": " ",
".": "^",
currency: {
",": " ",
".": "^",
},
percent: {
",": " ",
".": "^",
}
}
});
kendo.cultures["custom-US"] = customUS;
kendo.culture("custom-US");
</script>
@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.ProductViewModel>()
.Name("Grid")
.Columns(columns =>
{
columns.Bound(p => p.UnitPrice).Title("Unit Price");
})
.DataSource(dataSource => dataSource
.Ajax()
.Read("Products_Read", "Grid")
)
)
For a runnable example based on the code above, refer to the:
- [Globalization Overview]({%slug overview_globalization_core%})
- [Right-to-Left Languages]({%slug overview_rtlsupport_core%})
- [Localization]({%slug overview_localization_core%})
- [Telerik UI for {{ site.framework }} Breaking Changes]({%slug breakingchanges_2023%})
- [Telerik UI for {{ site.framework }} Knowledge Base](https://docs.telerik.com/{{ site.platform }}/knowledge-base)