6 Replies Latest reply on Jun 13, 2009 5:25 AM by leybniz

    NumberFormatter not working in ADG renderer

    Dustin69 Level 1

      Hi, anyone know why I'm getting "Call to a possibly undefined method" when trying to use a NumberFormatter in an advancedDataGridRenderer to show the AVG value in a summary row of grouped data.

       

      I've simplified the structure to just show the label for the purposes of explanation:

       

      <mx:AdvancedDataGridRendererProvider columnIndex="0" columnSpan="0" rowSpan="1" depth="1">

                <mx:renderer>

                     <mx:Component>

                          <mx:HBox width="100%" height="19">

                               <mx:Label text="Avg: {myNumberFormatter.format(data.averageValue)}" color="white"/>

                          </mx:HBox>

                     </mx:Component>

                </mx:renderer>

      </mx:AdvancedDataGridRendererProvider>

       

      Now the renderer works fine without using the NumberFormatter and I know the NumberFormatter works OK because I use it elsewhere in my code, just not in a renderer. I guess there's something simple I'm doing wrong here but what is it?!

       

      Thanks all

      Dustin