javascript Kendo UI 货币格式

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14090948/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-26 20:40:56  来源:igfitidea点击:

Kendo UI Currency Formatting

javascriptjqueryformattinggridkendo-ui

提问by imperium2335

How do I format a grid cell to use £s instead of the default $s?

如何格式化网格单元格以使用 £s 而不是默认的 $s?

I have looked high and low but there is no answer.

我高高低低的看着却没有答案。

I have:

我有:

{field: "price", title: "Price (£)", width: 95, format: "{0:c}"},

Which gives $0.00, but how do I get £0.00?

这给出了 0.00 美元,但我如何获得 £0.00?

I have tried calling:

我试过打电话:

kendo.culture("en-gb");

Before the grid but it does nothing.

在网格之前,它什么也不做。

回答by Atanas Korchev

You should first make sure the English culture JavaScript file is included. Then call kendo.culture("en-GB")(the casing is important).

您应该首先确保包含英语文化 JavaScript 文件。然后调用kendo.culture("en-GB")(外壳很重要)。

More info can be found in the globalizationhelp topic.

更多信息可以在全球化帮助主题中找到。