I have a status column in one of my jqGrid. It holds value 0 or 1. To me 0 means inactive and 1 means active. So i use a formatter to show the Active/Inactive instead of 0/1 in the grid . When I'm going to edit the record I'm getting that the correct value is not pre selected in the selectbox. In edit view the selectbox always shows Active as selected item. But If I show 0/1 in the grid instead of using the formatter then the edit windows shows the correct value in the selectbox selected item. But I need to show Active/Inactive instead of 0/1.
Formatter
formatter: function(cellValue, options,
rowObject) {
var val="";
if(cellValue=='1')
val= "Active";
else if(cellValue=='0')
val='<span class="cellWithoutBackground" style="background-color:#FFF4F4;color:red;">Inactive</span>';
else
val= '';
return val;