Skip navigation
Currently Being Moderated

Image not being rendered in DataGrid column on Mac

Feb 23, 2012 12:11 AM

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

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points