# Need sprite datagrid, but specify the color - see pic

**URL:** <https://forum.kirupa.com/t/need-sprite-datagrid-but-specify-the-color-see-pic/296554>\
**Category:** flash\
**Created:** [September 16, 2009, 4:24pm UTC](https://forum.kirupa.com/t/need-sprite-datagrid-but-specify-the-color-see-pic/296554 "2009-09-16T16:24:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![noverflow](https://avatars.discourse-cdn.com/v4/letter/n/e56c9b/32.png) [@noverflow](https://forum.kirupa.com/u/noverflow)\
**Post date:** [September 16, 2009, 4:24pm UTC](https://forum.kirupa.com/t/need-sprite-datagrid-but-specify-the-color-see-pic/296554/1 "2009-09-16T16:24:30Z")

</div>

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:

```auto

tagHolder.dataProvider.addItem({
	id: tag,
	color: ,
	name: '',
	show: true
});

```

and my grid looks like this:

```auto

<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?
