PDA

View Full Version : addRowCls() issue, no change visible



alex9311
27 Feb 2013, 4:02 PM
I'm trying to change a given row in my grid so that it is green. I'm using the addRowCls() function:

grid.getView().addRowCls(row,'green-row');


Here is my css for green-row:

.green-row {
background color: #99CC99 !important;
}
Which is included in my app.js file:

<link rel="stylesheet" type="text/css" href="format.css">



In firebug, I can see rows in my table get changed when I run my addRowCls function on them. They go from:
<tr class="x-grid-row">
to:
<tr class="x-grid-row green-row">

But the row's appearance doesn't change. Is my css wrong?

slemmon
27 Feb 2013, 8:08 PM
Try with this CSS instead.



.green-row .x-grid-cell {
background-color: #99CC99 !important;
}


Table Row (tr tags) can't have a background color, but all of the cells (td tags) can. So this should work for you.

alex9311
28 Feb 2013, 9:12 AM
yes that worked, thank you!