extjs grid color

change grid row’s color in extjs:

1.write a css file: icon.css

.x-grid3-record-red .x-grid-cell{
color: #FF0000 ;

2.link css file in jsp(before js, after ext-all.css):

<link rel=”stylesheet” type=”text/css” href=”css/icon.css”>

3. add js code into your grid:

viewConfig: {
forceFit: true,
getRowClass: function(record,rowIndex,rowParams,store){
return ‘x-grid3-record-red’;
}else {
return ”;


This entry was posted in Computer, Java. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s