What is the dataProvider? What data type are the items? "data" is an "object" can you can't bind to dynamic objects.
Sometimes a cast/convert will fix the warning, sometimes you need to wraqp the object in ObjectProxy. I would use a real itemRenderer and override the set data(), and asign the button lable in commitProperties(). Tracy ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of timgerr Sent: Friday, November 14, 2008 2:26 PM To: [email protected] Subject: [flexcoders] Re: DataGridColumn add a button and have the btn label = the returned dataField info 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] <mailto:flexcoders%40yahoogroups.com> , "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 >

