3

jqGridでセル内のリンクとしてフォーマット番号を持つことは可能ですか? 2 つのフォーマッタ番号と link/showlink を使用

colModel:[
{name:'Balance',index:'Balance',align:'right',formatter: 'showlink', sorttype:"float", summaryType:'sum', formatoptions:{thousandsSeparator:","}},...

バランスをリンクとして設定しようとしていますが、グループ化で合計できます

ティア

4

1 に答える 1

3

はい、できます!

カスタム フォーマッタを定義し、カスタム フォーマッタ内で元の「number」および「showlink」フォーマッタを呼び出すことができます。

たとえば、デモで

formatter: function (cellValue, options, rowObject, action) {
    return $.fn.fmatter.call(this, "showlink",
        $.fn.fmatter.call(this, "number", cellValue, options, rowObject, action),
        options,
        rowObject,
        action);
},
formatoptions: { decimalSeparator: ",", baseLinkUrl: "http://www.google.com/"}

optionsカスタム フォーマッタを の対応するパラメータとして使用したことがわかります$.fn.fmatter。そのため、「number」および「showlink」フォーマッタのオプションから mix を使用できますformatoptions

于 2013-07-14T15:13:39.163 に答える