PDA

View Full Version : Can we change the not editable column background ?



khatuido
3 Mar 2010, 1:35 AM
Hello

I got a grid with some editable column and others not editable.

I want the cell editable background color is blue
and the cell not editable color is red.

I didn't see any api about the css on the grid and i don't know if it's possible to change the background color.

So change the background color is it possible? Is it possible put a CSS on editable cell and another one on not editable cell?

fay
3 Mar 2010, 2:41 AM
Within the EditorGridPanel (http://www.extjs.com/deploy/dev/docs/?class=Ext.grid.EditorGridPanel) docs it points you to the column configuration (http://www.extjs.com/deploy/dev/docs/output/Ext.grid.Column.html) which shows you how to specify the css for individual columns. So add the following to your columns config:


// for read-only
editable: false,
css: 'background-color: red;'

// for editable
css: 'background-color: blue;'