View Full Version : Change Grid Background Color

29 Sep 2011, 9:01 AM
Seems like a simple request though I can't seem to find something that works. Is it possible to modify the background color of a cell or the cells in a column? I have seen some examples from prior releases to change the style of a cell though this doesn't seem to work properly. Is there a preferred / optimal approach to doing this?

29 Sep 2011, 9:04 AM

29 Sep 2011, 9:32 AM
The link had some information related to changing an entire row. I would actually like to change the background color for a column. The example below seems to work. The acceptable ways to create a renderer seems difficult to find in the documentation. In order words what are the acceptable parameters that can be passed to this function.

var myRenderer = function(value, metaData) {
metaData.style = "background-color: E8E8E8";

28 Aug 2012, 10:20 AM
Try tdCls option

{header: 'Col Header', dataIndex: 'data-index', width: 46, tdCls: 'labRed' }
.labRed {
color: red;

28 Aug 2012, 4:42 PM
Skirtle has a good article about "Styling Ext Grid Cell" (http://skirtlesden.com/articles/styling-extjs-grid-cells) that you should read.