View Full Version : Styling a Grouped row in AdvancedDataGrid
fu-meng
09-12-2009, 05:12 PM
In my app I have an AdvancedDataGrid and I use a Grouping Collection to convert that data to a hierarchy. With a Grouping Collection you can extend the AdvancedDataGridGroupItemRenderer and re-position the disclosureIcon, add borders and other styles, but.....
With another AdvancedDataGrid in my app I'm using <mx:hierarchicalData> so I don't have any "groups", per se. So, how do I style the "grouped" row? The AdvancedDataGridItemRenderer extends UITextField so I can't do any styling.
Any ideas?
Thanks for any helpful tips...
fu-meng
09-14-2009, 12:14 AM
Update: I was wrong, you absolutely do extend AdvancedDataGridGroupItemRenderer and use that with <mx:hierarchicalData>.
My only problem now is setting a background image in this renderer. I can draw plenty of stuff using the graphics property but there doesn't appear to be a way to add a background image. Has anyone done this before?
Peter Cowling
09-14-2009, 09:25 AM
I would checkout this flex coders (http://www.mail-archive.com/flexcoders@yahoogroups.com/msg96617.html) thread.
It is addressing a need to alter background alpha and colour, but the graphics.drawRectangle parts - to draw the background - can be swapped out for a background image.
It also has some good 'finds', the underlying reasons for which Doug McClune discusses.
fu-meng
09-14-2009, 07:16 PM
That is an interesting thread. I've been dealing a lot with AdvancedDataGrids lately and it certainly sheds some light on a lot of issues I've been dealing with.
Unfortunately, I can't use the example they had because it extends Label and I still need access to the disclosureIcon and label of the AdvancedDataGridGroupItemRenderer....so I'm stuck with extending that class.
I think I'm just going to try my luck at drawing a complex gradient using beginGradientFill();
Thank you for your help.
I would checkout this flex coders (http://www.mail-archive.com/flexcoders@yahoogroups.com/msg96617.html) thread.
It is addressing a need to alter background alpha and colour, but the graphics.drawRectangle parts - to draw the background - can be swapped out for a background image.
It also has some good 'finds', the underlying reasons for which Doug McClune discusses.
Peter Cowling
09-14-2009, 08:24 PM
Yeah, I have to say that this sort of stuff is much better in Gumbo. The re-factoring of skins means no (or at least none if have come across) tucked-away, and wierdly coded, design code. And pay-as-you-go helps too.
Good luck.
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.