I found some answers on how to apply css to a grid , but none of them helped me in my case.
Here are the links I looked at:
Look at this simple example from Sencha :
Ext.create('Ext.grid.property.Grid', {
title: 'Properties Grid',
width: 300,
renderTo: Ext.getBody(),
source: {
"(name)": "My Object",
"Created": Ext.Date.parse('10/15/2006', 'm/d/Y'),
"Available": false,
"Version": 0.01,
"Description": "A test object"
}
});
I am trying to change "name" column's background color and some text formatting. How?
I know hot to get to the column to change it size, but css is not working:
listeners : {
beforerender : function() {
var cols = this.getView().getHeaderCt().getGridColumns();
cols[0].setText("Property");
cols[0].setWidth(150);
}
}
s. roma
I'm quite an extjs-rookie, but what's about the column-cls: http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.grid.column.Column-cfg-cls
afaik you should be able to apply your style there
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.