Flex表格中添加图片-LMLPHP

 

Flex4.5中datagrid加入图片显示image

<s:DataGrid id="maingrid" x="0" y="36" width="100%" height="315"
          selectionChange="maingrid_selectionChangeHandler(event)">
        <s:columns>
         <s:ArrayList>
          <s:GridColumn dataField="XH" headerText="序号"></s:GridColumn>
          <s:GridColumn dataField="MC" headerText="名称"></s:GridColumn>
          <s:GridColumn headerText="图片" width="38">
           <s:itemRenderer>
            <fx:Component>
             <s:GridItemRenderer>
              <s:BitmapImage source="{data.DZ}" width="32" height="32"/>
             </s:GridItemRenderer>
            </fx:Component>
           </s:itemRenderer>
          </s:GridColumn>
          <s:GridColumn dataField="SJ" headerText="时间"></s:GridColumn>
         </s:ArrayList>
        </s:columns>             
       </s:DataGrid>

DZ属性类似:

data.DZ=http://localhost:8080/images/0001.jpg;

Flex表格中添加图片-LMLPHP

05-08 08:06