jqGrid formatter and sortable column - doesn't sort
- by HeavyWave
I am using a custom formatter for my jqGrid columnModel and I can't get sorting to work with formatter functions. If I remove formatter column sorts normally.
colModel: [
{ name: 'status', index: 'status', width: 18, sorttype: 'int', align: 'center', formatter: function(cellvalue, options, rowObject) {
return cellvalue == 1 ? "<img src='images/agent_green_s.png' alt='Ready' title='Ready' />" :
cellvalue == 3 ? "<img src='images/agent_red_s.png' alt='Busy' title='Busy' />" :
"<img src='images/agent_orange_s.png' alt='Pending Ready' title='Pending Ready' />";
}
How do I get sorting to work properly?