2

カスタム フォーマッタ内で定義済みのフォーマッタを使用したいと考えています。

たとえば、これは 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';
  }
}

出来ますか?ありがとうございました。

4

1 に答える 1