Is it possible have a format number as link in a cell with jqGrid? with two formatter number and link/showlink
colModel:[
{name:\'Balance\',index:\'Balance\'
Yes, you can!
You can define custom formatter and call the original "number" and "showlink" formatters inside of the your custom formatters.
For example the demo uses
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/"}
How you can see I used options
of custom formatter as the corresponding parameter of $.fn.fmatter
. So one can use mix from options of "number" and "showlink" formatters inside of formatoptions
.