How to bind jqGrid colModel Formatter dynamically

LoganW

New Member
I am trying to bind the formatter for the jqGrid column Model dynamically. I build the \[code\]colModel\[/code\] array dynamically as follows. \[code\]ColModel:[{name:Id,width:50,formatter:customerLinkFormatter}]\[/code\]I have extended the formatter as follows\[code\]$.extend($.fn.fmatter, {customerLinkFormatter: function (cellvalue, options, rowdata) { return '<a href="http://stackoverflow.com/questions/15869243/CustomerEdit.aspx?id=' + rowdata[options.colModel.name] + '"> ' + cellvalue + '</a>';}\[/code\]});But no link is displayed for the Id column. Please help me in figuring out.
 
Top