Item renderer that renders an image in a column
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
backgroundColor="white">
<mx:Script>
import mx.collections.ArrayCollection;
[Bindable]
public var myAC:ArrayCollection = new ArrayCollection([
{name:"A",thumbnail:"logo.jpg"},
{name:"B",thumbnail:"logo.jpg"}
]);
</mx:Script>
<mx:DataGrid id="dg" width="250" height="100"
dataProvider="{myAC}">
<mx:columns>
<mx:DataGridColumn headerText="Name" dataField="name" />
<mx:DataGridColumn headerText="Picture" dataField="thumbnail" itemRenderer="mx.controls.Image" />
</mx:columns>
</mx:DataGrid>
</mx:Application>
Related examples in the same category