jqgrid的说明文档
Formatter Options
格式化选项对特定的列定义,覆盖缺省值。这是通过使用colMode的formatoptions阵列
示例:
colModel : [
...
{name:"myname"... formatter:'currency', formatoptions:{decimalSeparator:",", thousandsSeparator: " ",
decimalPlaces: 2, prefix: "$ "}},
...
]
formatter类型为:货币 。
小数分隔符为, 千位分隔符为 空格 小数位数为 2 前缀为$
类型 | Options |
integer | {thousandsSeparator: " ", defaulValue: 0} |
number | {decimalSeparator:".", thousandsSeparator: " ", decimalPlaces: 2, defaulValue: 0} |
currency | {decimalSeparator:".", thousandsSeparator: " ", decimalPlaces: 2, prefix: "", suffix:"", defaulValue: 0} |
date | {srcformat: 'Y-m-d',newformat: 'd/m/Y'} |
showlink | {baseLinkUrl: '',showAction: 'show'} |
日期:formatter:'date',sorttype:'date',editrules:{date:true},search:false,editable:false,formatoptions: {srcformat:'Y-m-d H:i:s',newformat:'Y-m-d H:i:s'},datefmt:'Y-m-d H:i:s'