by the way, I'm using RemoteObject to access my CFC, is it possible
that the itemRenderer is firing before the data is back?
How would I make the data populate the ArrayCollection fooAC first
before rendering the datagrid? If this is the case anyways...
On Mon, Oct 6, 2008 at 1:37 PM, Greg Morphis <[EMAIL PROTECTED]> wrote:
> I'm trying to use a dataGrid itemRenderer and not sure I'm using it right.
> I get an error 1009 null error on data.*any_column*
>
>
> My data is coming back fine from the database, the column I'm trying
> to reference is "amount"
>
> <mx:DataGrid id="dg" width="100%" height="100%"
> dataProvider="{MyModel.getInstance().FooAC}"
> click="clickHandler(event);" dataTipFunction="buildToolTip">
> <mx:DataGridColumn dataField="amount"
> headerText="Amount:"
> textAlign="right"
> headerStyleName="centered"
> labelFunction="price_labelFunc"
> sortCompareFunction="price_sortCompareFunc"
> itemRenderer="com.renderers.PriceLabel" />
>
>
> The PriceLabel.as file exists in foo.com.renderers
> and looks like :
> package com.renderers {
> import mx.controls.Label;
> import mx.controls.listClasses.*;
> import mx.controls.Alert;
>
> public class PriceLabel extends Label {
>
>
> override protected function
> updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
> super.updateDisplayList(unscaledWidth, unscaledHeight);
> //Alert.show(data.toString());
>
> }
> }
> }
>
>
> What am I doing wrong?
>
> Thanks
>