OK, I did this to the button:
<mx:Button label="{data.ability}" width="75" />
but now I get warnings when I run the app:
warning: unable to bind to property 'ability' on class 'Object' (class
is not an IEventDispatcher)
What is this and what should I be doing to get the label?
Thanks again,
timgerr
--- In [email protected], "timgerr" <[EMAIL PROTECTED]> wrote:
>
> Hello all,
> I was wondering how to do somtgin that I think is complicated. I want
> to have a button in a DataGridColumn, I would like to have the button
> label be set to the data returned in that fataField. Here is what I
mean:
>
> <mx:DataGrid id="MEDG" width="100%" height="100%">
> <mx:columns>
> <mx:DataGridColumn headerText="Name" dataField="name"/>
> <mx:DataGridColumn headerText="Manufacturer"
> dataField="manufacturer"/>
> <mx:DataGridColumn headerText="Version" dataField="version"/>
> <mx:DataGridColumn headerText="Ability" dataField="ability">
> <mx:itemRenderer>
> <mx:Component>
> <mx:HBox horizontalAlign="center">
> <mx:Button label="{outerDocument.MEDG.ability}"/>
> </mx:HBox>
> </mx:Component>
> </mx:itemRenderer>
> </mx:DataGridColumn>
> </mx:columns>
> </mx:DataGrid>
>
> How can I set the button:
> <mx:Button label="{outerDocument.MEDG.ability}"/>
>
> to equal the data contained in:
> <mx:DataGridColumn headerText="Ability" dataField="ability">
>
> Thanks for the help,
> timgerr
>