是否可以将格式编号作为带有jqGrid的单元格中的链接?有两个格式化程序编号和链接/ showlink
colModel:[
{name:'Balance',index:'Balance',align:'right',formatter: 'showlink', sorttype:"float", summaryType:'sum', formatoptions:{thousandsSeparator:","}},...
我试图将Balance设置为链接,但仍然能够总结分组
TIA
答案 0 :(得分:3)
是的,你可以!
您可以定义自定义格式化程序,并在自定义格式化程序中调用原始的“数字”和“showlink”格式化程序。
例如the demo使用
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
的相应参数。因此,可以使用formatoptions
中“number”和“showlink”格式化程序的选项进行混合。