javascript - EXTJS Grid row coloring failed -


i using extjs 3.2. tried 1 sample grid row coloring reference http://skirtlesden.com/articles/styling-extjs-grid-cells. added grid view config in gridexample.js file holding static gird.,

    viewconfig: {      striperows: false,      getrowclass: function(record) {          return record.get('age') < 18 ? 'child-row' : 'adult-row';      }  

and added css in html page.

html code is,

<%@ page language="java" contenttype="text/html; charset=iso-8859-1" pageencoding="iso-8859-1"%> <!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/tr/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <title>success</title> <link href="/testing/ext/resources/css/ext-all.css" rel="stylesheet" type="text/css" /> <link href="/testing/ext/resources/css/test.css" rel="stylesheet" type="text/css" /> <style> .child-row .x-grid-cell {      background-color: #ffe2e2;      color: #900;  }   .adult-row .x-grid-cell {      background-color: #e2ffe2;      color: #090;  } </style> <script src="/testing/ext/adapter/ext/ext-base.js"></script> <script src="/testing/ext/ext-all.js"></script> <script src="/testing/js/gridexample.js"></script> </head> <body> </body> </html> 

but grid row color not changed. of forums sure code. so, problem css in html page? in advance.

ext 3.x uses css classes of form x-grid3-... grid elements. can inspect this 3.2 example's markup see yourself.

so, css should be:

.child-row .x-grid3-cell {      background-color: #ffe2e2;      color: #900;  }   

Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -