Same thing.  You would call invalidateDisplayList and that will cause
drawRowBackground to be called.

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of markgoldin_2000
Sent: Monday, June 30, 2008 1:38 PM
To: [email protected]
Subject: [flexcoders] Re: Draw colored shape

 

Alex, 
I am trying to create a solution that will allow me to change rows 
colors from external to a dataGrid events. For example, from a 
contextMenu or from a click of a button. 
What would you suggest?
If drawRowBackground it is then how do I execute it on demand?

--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Best way to color a row is to override drawRowBackground
> 
> 
> 
> ________________________________
> 
> From: [email protected] <mailto:flexcoders%40yahoogroups.com>

[mailto:[email protected] <mailto:flexcoders%40yahoogroups.com>
] On
> Behalf Of markgoldin_2000
> Sent: Monday, June 30, 2008 1:08 PM
> To: [email protected] <mailto:flexcoders%40yahoogroups.com> 
> Subject: [flexcoders] Draw colored shape
> 
> 
> 
> I am trying to use this function to change row's color in DG:
> public function setColor(row:Number, color:Number, 
Width:Number):void
> {
> var g:Graphics = graphics;
> g.clear();
> g.beginFill(color);
> g.drawRect(x, y, Width, 35);
> g.endFill();
> }
> I am calling this function after I have asiigned dataSource.
> 
> Dont see any coloring though.
> Is it all wrong?
> 
> Thanks
>

 

Reply via email to