【问题标题】:Decimal precision in an EXTJS grid Row Editing PluginEXTJS 网格行编辑插件中的小数精度
【发布时间】:2014-01-21 20:12:23
【问题描述】:

我正在使用带有 RowEditing 插件的 Extjs 4.2.1。我需要将小数点分隔符从“。”为了 ”,”。我在渲染事件视口中使用了这段代码

 Ext.util.Format.thousandSeparator = '.'; 
 Ext.util.Format.decimalSeparator = ',';

仍在网格中以小数分隔符编辑列 NumberField 编辑器继续以“。”而不是“,”。

如何更改 RowEditing 插件中的小数分隔符? 我想像这个链接 Decimal precision in an EXTJS grid

按照列定义:

           {
            text : "Valor unit&aacuterio",
            dataIndex : 'valorUnitario',
            flex : 1,
            align : 'right',
            menuDisabled : true,
            editor : {
                xtype : 'numberfield',
                allowBlank : false,
                minValue : 0,
                forcePrecision : true,
                decimalSeperator : ','
            },
            renderer : Ext.util.Format.numberRenderer('0.000,00')
           }

【问题讨论】:

  • 您的 numberfield 配置中有错字。配置属性是 decimalSeparator 不是 decimalSeperator docs.sencha.com/extjs/4.2.2/#!/api/…
  • 谢谢你,Akatum,这是一个错字,对不起我的错误。现在工作正常

标签: grid extjs4


【解决方案1】:

这是一个错字,对不起我的错误。现在完美运行

【讨论】:

  • 你应该刚刚更新了问题而不是这个。或者干脆彻底删除。
猜你喜欢
  • 2014-02-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多