Thanks I went for Option 1 (using a custom item renderer) only because I couldn't get Option2 (extend ClassFactory) working.
--- In [email protected], "turbo_vb" <TimHoff@...> wrote: > > ClassFactory doesn't support setting styles; they're different than > properties. You can get around this by either: > > 1) use a custom item renderer that has a styleName or css selector. > > 2) extend ClassFactory to support setting styles on the item renderer > instances. See com.blogagic.core.UIComponentFactory at > http://blogagic.com/_flex/libagic_source/srcview/index.html > > -TH > > --- In [email protected], "bhaq1972" <mbhaque@> wrote: > > > > GridColumn doesn't have the textAlign style. Instead we can do this - > > > > <s:GridColumn id="col" dataField="etc"> > > <s:itemRenderer> > > <fx:Component> > > <s:DefaultGridItemRenderer textAlign="right" color="black"/> > > .. > > > > How can I do this in actionscript? I've tried the following but doesn't work > > > > var renderer1:ClassFactory = new ClassFactory(DefaultItemRenderer); > > renderer1.properties = { textAlign:"right", color:0xff00ff }; > > col.itemRenderer = renderer1; //doesnt work > > >

