<? XML version = "1.0" encoding = "UTF-8"?> <S: Application xmlns: FX = "http://ns.adobe.com/mxml/2009" xmlns: S = "Library: // ns.adobe.com/flex/spark" xmlns: MX = "Library: // ns.adobe.com/flex/mx "minwidth =" 955 "minheight =" 600 "> <FX: SCRIPT> <! [CDATA [import MX. collections. arraycollection; [Bindable] public var myac: arraycollection = new arraycollection ([{name: "A", IMG: "file:/F:/Photo/Beautiful desktop/0002.jpg "}, {name: "B", IMG: "file:/F:/Photo/Beautiful desktop/0003.jpg"}, {name:" C ", IMG:" file:/F: /Photo/Beautiful desktop/0005.jpg"}, {name: "D", IMG: "file:/F:/Photo/Beautiful desktop/0006.jpg"}]);]> </FX: SCRIPT> <mx: dataGrid id = "DG" width = "100%" Height = "100%" dataprovider = "{myac}" rowheight = "200"> <mx: columns> <mx: datagridcolumn headertext = "name" datafield = "name"/> <mx: datagridcolumn headertext = "image" datafield = "IMG" itemrenderer = "MX. controls. image "/> </MX: columns> </MX: DataGrid> </S: Application>
Itemrenderer = "MX. Controls. Image"