Link to home
Start Free TrialLog in
Avatar of AEPUSER
AEPUSER

asked on

Flex 3 - How Do I Display dynamic icons in each row of datagrid (ex. PDF, Word,Excel)

Flex 3 - How Do I Display dynamic icons in each row of datagrid (ex. PDF, Word,Excel)
This is for a list of files that the user uploads, I need to show the proper Icon based on all of the different file types that may be uploaded by the end user.
Avatar of mplord
mplord
Flag of United Kingdom of Great Britain and Northern Ireland image

Breaking the problem into two:
* Acquire icon images
* Display images in datagrid

For the first point, if you're using Air not Flex, you can grab the icon image directly from the a File object.
However if you're intending this to be Flex only, the File class is not available and you'll have to create your own store of icons for different file formats.

For the datagrid, I'd create a component container for the image, and use this as an itemrenderer, dynamically switching which image the image control should display based on the extension of the filename in your underlying dataset.
Avatar of AEPUSER
AEPUSER

ASKER

Thank you for the reply & I have done this in .net code, adding controls as Image controls and setting the image URL accordingly, but... Can you show/paste some code that demonstrates how to access the individual image URL locations Using Flex 3 only.

Much Appreciated!
ASKER CERTIFIED SOLUTION
Avatar of mplord
mplord
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Polite request for an update - please remember to close questions if you're issue is resolved, or reply if you need further assistance ;)
We volunteer our time to help you, you could at least close the question when you've taken what you need.