1 Reply Latest reply on Jan 9, 2007 3:44 PM by Opsware_Jeff

    Getting data driven images to render in a datagrid...

    Opsware_Jeff Level 1
      I can't get my data driven image to render in my datagrid...

      I have code that loads all my icons and makes them into classes. I've read this is a best practice. It looks like this:
      public var compMgmt16:Class;

      I have a datagrid that renders my XML data. The XML data looks like this:
      <node label="Computer Management" icon="compMgmt16" viewStack="defaultView" />

      The datagrid looks like this:
      <mx:DataGrid dataProvider="{myXMLData}" >
      <mx:DataGridColumn headerText="Icon" dataField="@icon >
      <mx:Image source="{data.@icon}" />
      <mx:DataGridColumn headerText="Name" dataField="@label" />

      Why does this render the @label column correctly, but render a broken-picture image for the @icon ??? I use the image class vars (i.e. compMgmt16) successfully elsewhere in the app, so I know they are working in different contexts.

      Thanks so much,