PDA

View Full Version : Grid Header(title) style



ssamuel68
23 Apr 2013, 10:32 AM
Hi,

Its possible to change the grid title style? Like font, size, color, height.

Thx

slemmon
24 Apr 2013, 8:24 PM
If you inspect the DOM elements in Firebug / Chrome Dev Tools you should be able to see the CSS classes applied to the elements and create your own CSS rules for those classes (scope the changes only to specific grid by giving the grid a cls (http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.grid.Panel-cfg-cls) config first and scoping your custom CSS rules within that cls).

ssamuel68
25 Apr 2013, 5:33 AM
Thx @slemmon

I use the cls atribute on my grid and then add my custom cls like this:

Grid:

cls: 'gridTitle'

CSS:

.gridTitle .x-panel-header-text{ font-size:16px; color: darkorange;}

I can't find a success way to change height and don't mess with the grid toolbar but I think this post can be mark as answered.

SambitMishra
1 May 2013, 4:35 AM
Hi ssamuel68 (http://www.sencha.com/forum/member.php?365556-ssamuel68),

Simple

.gridTitle{ font-size:16px; color: darkorange;}columns : [
{ text : 'Name', dataIndex : 'name', cls: 'gridTitle'}
]


will work fine, just add the css to the column. for the header td height i dont think there is any way