在网格中显示货币符号
我正在从表中的共享点库检索数据。对于货币栏,我将其设置为印度货币。我将 spfield.dataformatstring 设置为 {0:c}。默认情况下显示 $ 符号而不是印度货币符号。
如何显示实际的货币符号?
提前致谢。
I am retrieving data from sharepoint library in a table. For currency column, i set it as indian currency. And i set spfield.dataformatstring as {0:c}. It is by default showing $ symbol instead of indian currency symbol.
How can i show the actual currency symbol?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您需要将正确的区域性信息传递给格式化程序,但是我不确定您是否可以直接在复合格式中执行此操作,但是您可以执行以下操作:
另一个选项是确保您已正确设置整个页面或站点的文化 - 显然服务器认为它是服务页面在 en-US 文化中默认为 up。
这通常可以在 web.config 中使用
元素在站点范围内完成,或者在页面中的页面级别完成指令<%@ Page UICulture="in" Culture="in-IN" %>
。话虽如此,SharePoint 增加了一些额外的复杂性,要求网站使用所需的语言创建,因此需要在其上安装正确的语言包。
You need to pass in the correct culture information to the formatter, however I'm unsure if you can do that directly within the composite formatting, however you could do something like:
The other option is to ensure that you've set the culture of your page or site as a whole correctly - clearly the server thinks it's serving pages up by default in the en-US culture.
This can usually be done site wide in the web.config, using the
<globalization uiCulture="in" culture="in-IN" />
element, or at the page level in the page directive<%@ Page UICulture="in" Culture="in-IN" %>
.That being said, SharePoint adds some additional complexity into the mix, requiring the site to have been created with the required language, and therefore to have the right language packs installed on top of it.
您需要设置正确的文化。
You need to set the correct culture.
我得到了解决方案。这是代码片段:
无需在 web.config 中执行任何操作即可正常工作。
I got the solution. Here is the code snippet:
It is working fine without do anything in web.config.