3 Replies Latest reply: Feb 23, 2012 1:27 AM by DeepAlone RSS

    Image not being rendered in DataGrid column on Mac

    DeepAlone Community Member

      Hi All,

       

      I am using item renderer for displaying image in one of the columns of datagrid. The problem is, when I am providing the full path like - "/User/Images/icon.png",  image is not being rendered. However when I put that image in "src/assets" folder and give path like - "assets/icon.png", image gets displayed.

       

      Could anyone please suggest what is going wrong?

       

      Here is the code snippet for item renderer

      //Start

       

      <mx:Image xmlns:mx="http://www.adobe.com/2006/mxml"

          width="250"

          height="40"

         source="{data.Icon}" 

          verticalAlign="middle"

          horizontalAlign="left"

          scaleContent="false"

          maintainAspectRatio="true"/>

       

      //End

       

      When data.Icon is "/User/Images/icon.png": Not being displayed.

      When data.Icon is "assets/icon.png" : Being displayed.

       

      I guess, I have to provide relative path.


      Thanks,

      D.A