in flex builder 3
I have this data grid, and one of the columns is a color association (what color line on a graph), so I need a sprite of a specific color when I enter a new row into the data grid - see pic below (what it should look like)
I cant use an image, because the color is detrained by the user in the preferences, and is different for each id
Im adding rows like this:
tagHolder.dataProvider.addItem({
id: tag,
color: ,
name: '',
show: true
});
and my grid looks like this:
<mx:DataGrid id="tagHolder" dataProvider="{tagAC}" >
<mx:columns>
<mx:DataGridColumn dataField="id" ></mx:DataGridColumn>
<mx:DataGridColumn dataField="color" >
<mx:itemRenderer>
<mx:Component>
<mx:Canvas>
//this does not need to be a canvas
</mx:Canvas>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
<mx:DataGridColumn dataField="name"></mx:DataGridColumn>
<mx:DataGridColumn headerText="show" dataField="show">
<mx:itemRenderer>
<mx:Component>
<mx:CheckBox click="outerDocument.toggleTagVisablility(data)"/>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>
Any ideas?