JQGrid: Changing background row color based on a column value in the row
I am trying to change the row color of any row in my jqgrid that has Active set to false. I want this color setting on load and on edit if this Active column is set to false.
I am relatively new to jqgrid and therefore have no idea how to do this. Please could someone explain this to me?
-
$(
'#GridTbl').jqGrid({ url: 'pathtomethod'
, editurl:
'pathtomethod', datatype:
'json', colNames: [
'Id', 'Task', 'Active'], colModel: [
{ name:
'Id', index: 'Id', hidden: true, editable: false },
{ name:
'TaskName', index: 'TaskName', sortable: true, editable: true, edittype: "select", editrules: { required: true} },
-
{ name:
'TaskActive'
, index:
'TaskActive'
, align:
"center"
, sortable:
false
, formatter:
"checkbox"
, editable:
true
, edittype:
"checkbox"
},
],
rowNum: 20,
hidegrid: false,
rowList: [20, 40, 60],
pager: $('#GridPager'),
sortname: 'TaskName',
viewrecords: true,
multiselect: false,
sortorder: 'asc',
height: '400',
caption: '',
shrinkToFit: false,
onPaging: function(pgButton) {
eonTaskMngmtTasks.currentElementId = null;
},