【发布时间】:2014-09-05 21:18:19
【问题描述】:
我的 jqgrid 中的一个单元格是货币格式的 formatoptions:{decimalSeparator:".",千位分隔符:",",decimalPlaces:2,前缀:"$",defaultValue:''}
当我有它的价值时就是这种情况 但是在我没有对该特定字段的值的情况下,默认情况下网格需要 $0.00 我想保持空白而不是填充默认值,即 $0.00
我该怎么做? 在查找了一些问题后,我使用了自定义格式化程序
if (cellValue != 0.00)
{
return $.fmatter.util.NumberFormat(closingAmount, $.jgrid.formatter.currency);
}
else
{
return "";
}
在这种情况下,如何添加 $ 作为前缀?当然,在这个领域排序是行不通的。 期待某人的快速帮助和修复 提前谢谢!!
【问题讨论】:
标签: javascript jquery jqgrid currency jqgrid-formatter