Hi Arpan,

You need to use the properties property of ClassFactory. This is
basically an object whose properties get assigned to your factory
class's public properties with matching names. For example, if your
gridItemRenderer class has public properties called "someString",
"someNumber" and "otherObject", you would do this:

var myFactory:ClassFactory = new ClassFactory(gridItemRenderer)

var myObj:Object = new Object();
myObj.someString:String = "hi there";
myObj.someNumber:Number = 7873;
myObj.otherObject:CustomType = myOtherCustomObject;

myFactory.properties = myObj;

lineChartColumn.itemRenderer = myFactory;


You can also use this approach to set up bindings inside the factory
class, so that its values are bound to external properties. This
approach is demonstrated here:
http://www.returnundefined.com/2006/11/creating-truly-reusable-renderers-with-classfactory/

HTH,
Ben


--- In flexcoders@yahoogroups.com, arpan srivastava <[EMAIL PROTECTED]>
wrote:
>
> Hi,
>     I have created an itemRenderer for the datagrid. I have lots of
properties in the itemRenderer that can be set at rumtime by the user.
How to set those properties in my itemRenderer.
> 
> This is what I did:
> 
> lineChartColumn.itemRenderer = new ClassFactory(gridItemRenderer);
> 
> Now in "gridItemRenderer.as" I have properties to set e.g. colors.
So if user changes the properties how can i set those properties in
"gridItemRenderer.as" ?
>


Reply via email to