Flex DataGrid Example for Image
Use this code on your mxml File
<mx:DataGrid width="90%"
height="90%"
id="dataGrid">
<mx:columns>
<mx:DataGridColumn dataField="_designIcon"
headerText="Design Icon">
<mx:itemRenderer>
<mx:Component>
<mx:HBox horizontalAlign="center" height="84">
<mx:Image source="{data._designIcon}"/>
</mx:HBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
<mx:DataGridColumn dataField="_designName"
headerText="Design Name" />
<mx:DataGridColumn dataField="_designDataSize"
headerText="Design Data Size(MB)" width="200" />
<mx:DataGridColumn dataField="_designLocation"
headerText="Design Local Path" />
<mx:DataGridColumn headerText="Delete Item">
<mx:itemRenderer>
<mx:Component>
<mx:LinkButton label="Delete" click="outerDocument.deleteItem(event)"/>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>
Use this code into mx:script tag
private var rows:ArrayCollection;
rows.addItem(new PackageRowInfo(IconLocation, contentType,fileSize ,path));
for packageRowInfo class use following code
public class PackageRowInfo
{
public var _designIcon:String;
public var _designName:String;
public var _designDataSize:String;
public var _designLocation:String;
public function PackageRowInfo(designIcon:String,designName:String,designDataSize:String,designLocation:String)
{
_designIcon = designIcon;
_designName = designName;
_designDataSize = designDataSize;
_designLocation = designLocation;
}
}