Without knowing exactly what you want to do, I can only recommend looking into 
Peter's usage of a rowColorFunction. You could set a property whenever a button 
gets clicked, and the rowColorFunction could look at that particular property 
when deciding what color to draw the row.


----- Original Message ----
From: markgoldin_2000 <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Monday, June 30, 2008 1:52:10 PM
Subject: [flexcoders] Re: Draw colored shape


I am familiar with this article (or so I think). But I need to be 
able to change rows colors from external to DG events. ContextMenu 
for example or a button click.

--- In [EMAIL PROTECTED] ups.com, Enjoy Jake <enjoy_jake@ ...> wrote:
>
> Peter Ent posted a very well written article about coloring 
DataGrids:
> 
> 
http://weblogs. macromedia. com/pent/ archives/ 2007/02/coloring _the_ba.ht
ml
> 
> PS In case you didn't know, Peter Ent rocks.
> 
> 
> ----- Original Message ----
> From: markgoldin_2000 <markgoldin_ [EMAIL PROTECTED]>
> To: [EMAIL PROTECTED] ups.com
> Sent: Monday, June 30, 2008 1:38:24 PM
> 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] ups.com, "Alex Harui" <aharui@> wrote:
> >
> > Best way to color a row is to override drawRowBackground
> > 
> > 
> > 
> > ____________ _________ _________ __
> > 
> > From: [EMAIL PROTECTED] ups.com 
> [mailto:flexcoders@ yahoogro ups.com] On
> > Behalf Of markgoldin_2000
> > Sent: Monday, June 30, 2008 1:08 PM
> > To: [EMAIL PROTECTED] ups.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