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
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.
To further expand on Zak's response:
The reason it was not working was that you need to provide a valid url for a File object.
For more details on the format of urls and nativePaths pertaining to local files, take a look at the AIR File documentation:
Europe, Middle East and Africa