jqGrid中对列表cell属性格式化
jqGrid中对列表cell属性格式化设置主要通过colModel中formatter、formatoptions来设置 基本用法: Js代码 jQuery( "#jqGrid_id" ).jqGrid({ ... colModel: [ ... {name: 'price' , index: 'price' , formatter: 'integer' , formatoptions:{thousandsSeparator: ',' }}, ... ] ... }); formatter主要是设置格式化类型(integer、email等以及函数来支持自定义类型),formatoptions用来设置对应formatter的参数,jqGrid中预定义了常见的格式及其options: integer thousandsSeparator: //千分位分隔符, defaulValue number decimalSeparator, //小数分隔符,如"." thousandsSeparator, //千分位分隔符,如"," decimalPlaces, //小数保留位数 defaulValue currency decimalSeparator, //小数分隔符,如"." thousandsSeparator, //千分位分隔符,如"," decimalPlaces, //小数保留位数