Creating inline item renderer and editor
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" >
<mx:Script>
import mx.collections.ArrayCollection;
[Bindable]
private var myData:ArrayCollection = new ArrayCollection([
{CD:'A', Album:'aa',Price:1.99, Cover: 's.jpg'},
{CD:'B', Album:'bb',Price:1.99, Cover: 'b.jpg'}
]);
</mx:Script>
<mx:DataGrid id="myGrid" dataProvider="{myData}" rowHeight="50">
<mx:columns>
<mx:DataGridColumn dataField="CD"/>
<mx:DataGridColumn dataField="Album"/>
<mx:DataGridColumn dataField="Cover">
<mx:itemRenderer>
<mx:Component>
<mx:Image height="45"/>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
<mx:DataGridColumn dataField="Price"/>
</mx:columns>
</mx:DataGrid>
</mx:Application>
Related examples in the same category