【问题标题】:How can I format the numbers in viewrecord on jqgrid pager?如何在 jqgrid 寻呼机的 viewrecord 中格式化数字?
【发布时间】:2011-04-12 18:16:51
【问题描述】:

当存在大量页面时,寻呼机中数字的格式是“11 223”,但我希望它是“11,223”

查看 11 026 - 11 031 个,共 11 031 个

应该是

查看 11,026 - 11,031 个,共 11,031 个

我搜索了 JQGrid 的文档,但找不到执行此操作的方法。

【问题讨论】:

    标签: formatting jqgrid pager number-formatting


    【解决方案1】:

    你可以设置

    $.jgrid.formatter.integer.thousandsSeparator=',';
    

    或在 grid.locale-en.js 文件(或您使用的其他语言环境文件)中修改第 90 行

    integer : {thousandsSeparator: " ", defaultValue: '0'},
    

    (在最小化版本中,您应该搜索integer:{thousandsSeparator:" ")到该行

    integer : {thousandsSeparator: ",", defaultValue: '0'},
    

    顺便说一句,你也可以设置$.jgrid.formatter.integer.thousandsSeparator='',那么它不会是千位分隔符:你将使用“11223”而不是“11,223”来代替“11 223”。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-05-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多