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], Enjoy Jake <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> > To: [email protected] > 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:[EMAIL PROTECTED] 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 > > >

