0 Replies Latest reply on Mar 15, 2009 2:10 AM by PetrKucera

    itemRenderer DataGridColumn with AS

    PetrKucera Level 1
      Hi all,
      I need to build DataGrid in ActionScript, where is a column with image. Something like
      <mx:DataGrid id="DataGrid1" rowCount="8" dataProvider="{mainListCollection}">
      <mx:DataGridColumn itemRenderer="mx.controls.Image" headerText="Type" dataField="fileIcon" />
      </mx:DataGrid>

      When I run my application with AS code
      DataGridColumn2.headerText = "Type";
      DataGridColumn2.dataField = "fileIcon";
      DataGridColumn2.itemRenderer = new ClassFactory(mx.controls.Image);
      DataGrid1.columns = [DataGridColumn1,DataGridColumn2,DataGridColumn3];
      I see in column 2 (Type) only a broken image.

      How can I do it, please?

      Cheers Petr