I'm going to quote Alex H here:
"
Try something like (foo contains 'pdf' or 'word'):

<mx:Script>
    import mx.controls.Image

    private function addGif(o, c)
    {
        return o.foo + ".gif"
    }
<mx:DataGridColumn labelFunction="addGif" itemRenderer="Image" />"

o is a member of your dataProvider.  In your case, maybe o=status, the
labelFunction can then determine which image source you want.  FYI, Image is
a Flex control supporting teh IDropInListItemRenderer  interface.  See
http://livedocs.adobe.com/flex/2/docs/00000835.html


Just a note that you can search the archives of this list, there is a link
at the bottom of each email sent.

DK

On Nov 14, 2007 12:53 PM, tomeuchre <[EMAIL PROTECTED]> wrote:

>   I have a DataGrid that has a Status field. The value can be from 0 to 9.
> I have 9 icons (jpg files), each of which corresponds to the Status
> number.
>
> I am able to use an itemRenderer to draw the background color
> associated with the Status value, but what I really need to do is
> insert an icon that represents the status color.
>
> I have searched all over, and it seems the only examples are for
> changing the style or filling the background color.
>
> I get data from a remoteObject call so this is not static XML data, but
> the DataGrid dataProvider is the returned XMLListCollection.
>
> Any help would be appreciated.
>
>  
>



-- 
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?

Reply via email to