How can I change the background color of a cell in a jqgrid custom formatter?
If you want use <span> element inside of the custom cell formatter you can return from the custom formatter return ‘<span class=”cellWithoutBackground” style=”background-color:’ + color + ‘;”>’ + cellvalue + ‘</span>’; where the style of span.cellWithoutBackground you can define for example like following span.cellWithoutBackground { display:block; background-image:none; margin-right:-2px; margin-left:-2px; height:14px; padding:4px; } How it works … Read more