Oh, I fully understand why it's a problem with how they've decided to implement it. I'm just saying they might rethink on how they want to implement it if the outcome is that they're missing a feature that's pretty standard on every other grid component out there. Who knows, maybe in Flex 4...
On Thu, Feb 21, 2008 at 8:20 PM, sreeni_r <[EMAIL PROTECTED]> wrote: > > I think it is the problem with itemRenderers or TextField in > particular. If a itemRenderer doesn't support backgroundColor as a > style there is very little ADG can do. Hence a small tweak is > required to get this working. > > As TextField doesn't support alpha when background is true some users > don't like this idea and go on to override the drawRowBackground. > > --- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>, "Pan > Troglodytes" > <[EMAIL PROTECTED]> wrote: > > > > I am fairly shocked that AdvancedDataGrid does not support this out > of the > > box. They went to a lot of trouble to make styling a single cell > easy, yet > > left out one of the most important parts. Hope this is added before > > release. > > > > > > On Thu, Feb 21, 2008 at 12:33 AM, sreeni_r <[EMAIL PROTECTED]> wrote: > > > > > > > > I have posted a working sample here which I think you can tweak it > > > work your scenario. > > > > > > http://flexpearls.blogspot.com/2008/02/row-background-color- > in.html > > > > > > -Sreenivas > > > > > > --- In flexcoders@yahoogroups.com > > > <flexcoders%40yahoogroups.com><flexcoders% > 40yahoogroups.com>, "Dominic > > > > Pazula" <dompazz@> > > > wrote: > > > > > > > > > > > I thought this would be easy to do, but I have been banging my > head > > > > on it for a while. I'm wanting to let the user "mark" rows as > they > > > > scroll through the ADG. > > > > > > > > I created a function myRowStyle and set > > > styleFunction="myRowStyle". > > > > What I cannot figure out is how to change the background color > on > > > the > > > > row. I've figured out how to change just about everything else. > > > > > > > > Here is the myRowStyle function. I am just setting a static set > of > > > > rows to the style to help me figure this out. > > > > > > > > private function myRowStyle(data:Object, > > > > col:AdvancedDataGridColumn):Object{ > > > > var vals:Array = [0, 2, 4, 6]; > > > > > > > > var i:int = dg.dataProvider.getItemIndex(data); > > > > > > > > if (vals.indexOf(i) >= 0){ > > > > var o:Object = new Object; > > > > o.color = 0x000000; > > > > o.fontWeight = "bold"; > > > > o.backgroundColor = 0xFF0000; > > > > return o; > > > > } > > > > else return null; > > > > } > > > > > > > > o.backgroundColor is just my latest attempt. I've tried > everything > > > I > > > > can think of, but obviously have not thought of everything. > > > > > > > > Does anyone know the trick to doing this? > > > > > > > > Thanks > > > > Dominic > > > > > > > > > > > > > > > > > > > > > -- > > Jason > > > > > -- Jason