0 Replies Latest reply on Sep 4, 2007 5:12 AM by gbuyle

    Datagrid display Bitmap Image

    gbuyle Level 1
      Hi,

      I created an Flex application connecting a database via Coldfusion. The query result returned a binary data field (image) stored in a database. How can I get this Image displayed in the a datagrid. I tried the following 3 ways but don't see any image displayed into the datagrid :

      <mx:DataGrid dataProvider="{qResult}" width="100%" height="100%">
      <mx:columns>
      <mx:Array>
      <mx:DataGridColumn dataField="PIC_ICONE"
      headerText="{resourceManager.getString(RB_LABELS, 'admn.manageIcons')}"
      />
      <mx:DataGridColumn dataField="PIC_ICONE"
      headerText="{resourceManager.getString(RB_LABELS, 'admn.manageIcons')}"
      textAlign="center"
      itemRenderer="mx.controls.Image"
      />
      <mx:DataGridColumn dataField="PIC_ICONE"
      headerText="{resourceManager.getString(RB_LABELS, 'admn.manageIcons')}"
      textAlign="center"
      itemRenderer="component.ImageRenderer"
      />
      </mx:Array>
      </mx:columns>
      </mx:DataGrid>

      /* */
      <?xml version="1.0" encoding="utf-8"?>
      <mx:VBox
      xmlns:mx=" http://www.adobe.com/2006/mxml"
      horizontalAlign="center" verticalAlign="middle"
      width="100%" height="140"
      >

      <mx:Script>
      <![CDATA[
      import mx.controls.Image;
      ]]>
      </mx:Script>
      <mx:Image source="{new Bitmap(data.PIC_ICONE)}"/>

      </mx:VBox>

      Could someone help me to solve this problem.