It depends.
Under what conditions should those properties change? 90% of the time,
those properties are dependent on the data in the dataprovider and thus
aren't really set by the user.
If the properties are styles, then the user can set them as styles,
which will affect all instances of the renderer.
You may also create your own IFactory that sets properties.
class gridItemRendererFactory implements IFactory
{
public function newInstance():Object
{
var gir:GridItemRenderer = new
GridItemRenderer();
gir.prop1 = val1;
gir.prop2 = val2;
return gir;
}
}
________________________________
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of arpan srivastava
Sent: Wednesday, November 29, 2006 6:39 AM
To: Flex Coders; Flex Components
Subject: [flexcomponents] change properties in itemRenderer at runtime ?
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" ?