drawRowBackground runs often, not just at creation time, but it does run
before drawColumnBackgrounds.
You can use the examples from my blog that have customized cell
backgrounds and skip the whole drawRow/drawColumn stuff.
You can also try switching the z order of the row and column
backgrounds. That's not officially supported, but some sort of
getChildByName(lines) and getChildByName(rowBGs) and testing
getChildIndex and using setChildIndex might allow you to switch the z
order.
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of markgoldin_2000
Sent: Sunday, June 29, 2008 10:18 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] dataGrid - hightlight row
I have seen some examples of this and these samples I've seen all are
implementing drawRowBackground which works fine but not in my case. I
need to change row's background after I have applied columns
background. But drawRowBackground runs at a time dataGrtid is created
so my row background that was set in drawRowBackground gets overwritten
by the later upplied column's background. I am then trying to implement
a custom renderer that accepts a click and changes draws a colored area
around itself:
g.drawRect(e.target.x, e.target.y, e.target.width, e.target.height + 1);
g.endFill();
Using this approach I can color the whole row. But is a catch: my
columns have different colors. In case I have to restore row's
background color to original color how can I do that? Is there a simple
way of doing it or I need to store colors into array and then restore
them using same technique?
Thanks