I have a datagrid which is populated by xml data (representing tasks) returned 
via an 
httpservice call. The xml data has an integer field representing the priority 
of a task. I wish 
to display different icons in the first column of the grid dependant on the 
value of the 
integer.

Assumption: for best performance i should embed the icons.

I have 2 questions:

1) In order to render the icons do I call a function to loop through the xml 
data and insert 
the images after the datagrid is redrawn or is there some event I can trap 
after each row is 
drawn so I can call a function to return/insert the correct image on a row by 
row basis?

2) How do I go about inserting the embedded image into the datagrid cell? I 
have put an 
itemRenderer in the column but at present am just using a fixed url in the 
source attribute 
of the enclosed image tag. My source for the column is below:

<mx:DataGridColumn headerText="" width="30" dataField="priority">
        <mx:itemRenderer>
              <mx:Component>
                   <mx:HBox horizontalAlign="center">
                       <mx:Image id="priorityImage" height="16" 
source="../icons/dot.png"/>
                    </mx:HBox>
              </mx:Component>
         </mx:itemRenderer>
</mx:DataGridColumn>







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to