PDA

View Full Version : getRowStyle is not applied when I scroll down for new set of row from BufferView grid



kishorekadiri
13 Jul 2009, 6:58 AM
I am able to apply background color to the entire row by following steps from

http://extjs.com/forum/showthread.php?t=52598

Thaks a lot darrellmeyer (http://extjs.com/forum/member.php?u=4759) for your help here. vbmenu_register("postmenu_256209", tru

However I have two cases where I got struck here.

Case 1:
-----------
How can I change font color and weight for the columns data, for the entire row that I have selected?
(for eg; I have columns such as From, Subject, Received and Size) similar to outlook, when I mark entire row as unread, the text of each column becomes bold)


Case 2:
-----------
When I scroll down for the next set of messages from Buffer Grid View, RowStyle CSS is not applied to those new rows.
Is there any possible way to fix this case?

Appreciate your help as always.

Thanks a lot,
Kishore Kadiri

kishorekadiri
13 Jul 2009, 8:09 AM
I tried with the following CSS to apply bold for each column of the entire row.

.unread-row .x-grid3-cell-text{
font-weight: bold;
}
.read-row .x-grid3-cell-text{
font-weight: normal;
}
But still no luck on this.....

Any pointers on this would be highly appreciated.....

Thanks in advance,
Kishore Kadiri

kishorekadiri
13 Jul 2009, 12:07 PM
Is there anything that we can fix at CSS side?

x-grid3-cell-text is different wit GXT 1.x w.r.t GXT2.0 ....

Any pointers on above two cases would be highly appreciated....

-Kishore

kishorekadiri
14 Jul 2009, 4:34 AM
It works well, when I apply background-color

.test {
background-color: blue;
}

I tried out many possibilities but no luck; for eg: below CSS is applied to entire Grid

.x-grid3-row td {
font-weight: bold;
}

But my requirement is to apply for the selected row.

CSS experts please respond to this thread.....

-Kishore

elirov
27 Jul 2009, 5:36 PM
I have the same problem. Styles get applied to the rows that are in view, but any "offscreen" rows are rendered in the default style. I tried the "! important" flag too. Doesn't help.

elirov
27 Jul 2009, 5:41 PM
I think it's a problem with this part of the code (BufferView:268):

In the if (visible) clause, the div class=\"x-grid3-row continues and INCLUDES the alt variable (which has our styles in it).

The else (invisible) clause prematurely ends the string, and our alt variable hangs out in mid-air...

Here's the offending code:

if (visible) {

if (!onlyBody) {
buf.append("<div class=\"x-grid3-row ");
buf.append(alt);
buf.append("\" style=\"");
buf.append(tstyle);
buf.append("\">");
}
buf.append("<table class=x-grid3-row-table border=0 cellspacing=0 cellpadding=0 style=\"");
buf.append(tstyle);
buf.append("\"><tbody><tr>");
buf.append(cb.toString());
buf.append("</tr>");
buf.append((enableRowBody
? ("<tr class=x-grid3-row-body-tr style=\"\"><td colspan=" + colCount + " class=x-grid3-body-cell tabIndex=0><div class=x-grid3-row-body>${body}</div></td></tr>")
: ""));
buf.append("</tbody></table>");
if (!onlyBody) {
buf.append("</div>");
}

} else {
buf.append("<div class=\"x-grid3-row \""); // <----- THIS STRING SHOULD NOT END HERE
buf.append(alt);
buf.append("\" style=\"");
buf.append(tstyle);
buf.append("\"></div>");
}

elirov
27 Jul 2009, 5:45 PM
Yup. That fixed it for me:

} else {
buf.append("<div class=\"x-grid3-row ");
buf.append(alt);
buf.append("\" style=\"");
buf.append(tstyle);
buf.append("\"></div>");
}

sven
28 Jul 2009, 1:04 AM
Fixed in SVN