0 Replies Latest reply on Jan 10, 2007 7:55 PM by Säeven

    Help using ItemRenderer to show images based on digits in DataGrid model

      Hi there,

      Disclaimer: this is my very first attempt at Flex!

      I found rummaging online, some documentation about ItemRenderers. I have a datagrid pulling info from a PHP Ajax backend successfully. One of the columns retrieves a digit only (1, 2, or 3 ).

      I've read that I can create a CellRenderer by creating a mxml file for the renderer (StatusRenderer.mxml), adding this to my <mx:DataGridColumn specification:


      where my StatusRenderer.mxml right now contains only:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Canvas xmlns:mx=" http://www.adobe.com/2006/mxml" width="32" height="32">


      It displays a blank square as expected.

      so now, how do I make it show images/open.gif, images/closed.gif or images/deferred.gif based on status, 1, 2, or 3 respectively?

      Not sure how actionscript blends into components this way..

      Thanks in advance!