I use jquery and jgrid for create a grid in php. I have modified the color of a column of my grid, using:
$grid[“loadComplete”] = "function(ids) { onloadFunction(ids)";
The onloadFunction function is as follows:
function onloadFunction(ids) {
var ids = $(“#lstStudents”).jqGrid(‘getDataIDs’);
for (var z=0;z<ids.length;z++) {
var id=ids[z];
$(“#lstStudents”).jqGrid(‘setCell’,id, ‘quarter1’,”, {‘background’:’rgb(250, 250, 250)’});
$(“#lstStudents”).jqGrid(‘setCell’,id, ‘quarter1’,”, {‘color’:’rgb(0, 0, 0)’});
}
}
When selecting a row, the column whose color I modified in the onLoadFunction function remains with the established color, that is, it does not take the defined color of a selected row. How would I make the modified column also have the background color and text color of the rest of the columns?
Image to clarify better: https://i.stack.imgur.com/MC6fC.jpg
Thank you very much for the help.