Need a help on this please... I just now upgraded to free-jqgrid 4.13.6. Earlier I was using jqgrid 4.3
In jqgrid 4.3 I was using and it was adding CSS class red-highlight to a particular cell
grid.jqGrid('setCell', row_id, 'status', '', 'red-highlight');
But after migrating to free-jqgrid 4.13.6, this is not working anyomre.
function validateOnSubmit() {
var grid = $("#mySearchResultGridTable");
var obj = $('#mySearchResultGridTable').jqGrid ('getRowData');
$.each(obj, function(key, value) {
var row_id = key+1;
if ($("tr#jqg" + thisRow).attr("editable") === "1") {
selectedStatus = $("#jqg"+ row_id +"_status").val();
}
if(selectedStatus == '' || selectedStatus == 'Select') {
grid.jqGrid('setCell', row_id, 'status', '', 'red-highlight');
});
}
$grid.jqGrid({
datatype: 'json',
url: 'myUrl.do?custId=' + custId,
mtype: 'GET',
ajaxSubgridOptions: { async: false },
colNames:[ 'Customer Id', Status', 'Comments'],
colModel:[
{name:'customerId', width:75, fixed: true, sortable: true, search: false, frozen: true, resizable: false, classes: 'customer_id_grid_class'},
{name:'customerNm', width:215, fixed: true, sortable: true, search: false, frozen: true, resizable: false, classes: 'customer_name_grid_class'},
{name:'status', index:'status', sortable: false, search: false, width: 80, fixed: true, align:'center', resizable: false, editable: true, stype:'select',
edittype:'select', editoptions:{
value:'Select:Select;Y:Yes;N:No',
defaultValue:'Intime',
multiple: false
},
searchoptions: {
sopt: ['eq','ne'],
value: 'Y:Yes;N:No',
attr: {multiple: 'multiple', size: 3},
dataInit: dataInitMultiselect
}
},
{name:'comments', width:150, fixed: true, sortable: false, search: false, editable: true, resizable: false, editoptions: { maxlength: 3000 }}
],
headertitles:true,
rowNum:999,
rowList:[],
pager: '',
records: 1000,
pgbuttons : false,
viewrecords : false,
pgtext : null,
pginput : false,
gridview:true,
ignoreCase:true,
rownumbers:true,
sortname: 'invdate',
viewrecords: true,
sortorder: 'desc',
multiselect: true,
caption: "Customer Search",
height: '100%',
editurl: 'clientArray',
autoencode: true,
loadonce: true,
multiselectWidth: 30,
width: 1024,
viewsortcols : [true,'vertical',true],
});
JSON data:
[{
"customerId": "123",
"customerNm": "Dany Web",
"status": "Y",
"comments": "testing"
}, {
"customerId": "345",
"customerNm": "Charlie Studdard",
"status": "N",
"comments": "testing"
}]
Edit on double click:
ondblClickRow: function(id){
$(this).jqGrid('editRow', id, true);
}
Any help please...