0 Replies Latest reply on Feb 20, 2007 7:38 AM by sutuy

    image renderer in datagrid disappear after up and down the scroll bar

    sutuy
      i have write this code to show my image set in datagrid.
      <?xml version="1.0"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml">

      <mx:Script>
      <![CDATA[
      [Bindable]
      public var initDG:Array = [
      {Artist:'Pavement', Cover: 'albums/brighten.jpg'},
      {Artist:'Megumi, Cover: 'albums/nice.jpg'}
      ];
      ]]>
      </mx:Script>

      <mx:DataGrid id="myGrid" dataProvider="{initDG}" rowHeight="50">
      <mx:columns>
      <mx:DataGridColumn dataField="Artist"/>
      <mx:DataGridColumn dataField="Cover">
      <mx:itemRenderer>
      <mx:Component>
      <mx:Image height="45"/>
      </mx:Component>
      </mx:itemRenderer>
      </mx:DataGridColumn>
      </mx:columns>
      </mx:DataGrid>
      </mx:Application>

      it works properly, the picture was showed. but, when the "scroll" appear (because the big number of data) and i scroll down and then scroll up again. the images were disappear (like broken link). anyone know my mistakes?