This is in continuation of jqgrid - json looping issue with the difference that I have moved the colNames and colModel to JSON.
If you don't need unformatter you can extend the list of predefined formatters with your formatter:
$.fn.fmatter.myLinkFormatter = function (val, options, rawObject) {
....
};
and then use "formatter": "myLinkFormatter"
in the column definition
{
"colModel": [
{
"name": "linkimg",
"index": "linkimg",
"width": 60,
"align": "left",
"formatter": "myLinkFormatter",
"jsonmap": "cells.0.links"
}
],
"colNames": [
"linkimg"
],
"mypage": {
"outerwrapper": {
...
}
}
See the demo.
One more remark: you should move $("#myjqgrid").jqGrid('navGrid','#Pager');
inside of success
handler like I done in the demo.