2
我想在自定義格式器中使用預定義格式器。jqGrid:在自定義格式器中使用預定義格式器
例如,這是colModel:
colModel: [
...
{ name: 'col1', formatter: myFormatter }
...
]
,這是格式化:
function myFormatter(cellValue, options, rowObject) {
if (typeof cellValue === 'number') {
// Here I want to call the "currency" predefined formatter on the cellValue
} else {
return 'No number to display';
}
}
這可能嗎? 謝謝。