I can't get it to call my custom function, i'm trying to make sure it is getting called so I have an alert in the function and it is simply returning 'hello':
$(document).ready(function() {
jQuery("#listZones").jqGrid({
url: '/onemedia/creative/edit-get-zones/id/6',
datatype: 'json',
mtype: 'POST',
multiselect: false,
colModel: [{"name":"id","index":"id","width":1,"hidden":true,"key":true},{"label":"Items","name":"name","index":"name","sortable":false},{"label":"Linked","name":"link","index":"link","sortable":false,"width":60,"align":"center","formatter":"customFormat"},{"label":"CHECK TEST","name":"checkTest","index":"checkTest","sortable":false,"width":60,"align":"center","formatter":"checkbox"}],
pager: jQuery('#pager'),
rowNum: 10,
rowList: [10,20,30,40,50],
sortname: 'id',
sortorder: 'asc',
viewrecords: true,
imgpath: '/js/jqGrid/themes/steel/images',
caption: 'Applications / Zones',
width: 600,
height: 'auto',
gridComplete: function(){ },
ondblClickRow: function(rowid, iRow, iCol, e){ },
onSelectRow: function(rowid, status){ },
treeGrid: true,
treeGridModel: 'adjacency',
ExpandColumn: 'name',
cellEdit: false,
cellsubmit: 'remote',
cellurl: ''
});
});
function customFormat(cval, options, rowObject) {
alert('here');
var checked = (cval == 'yes')?" checked='checked'":"";
return "hello";
}