Should be data.fn;
Note, you must set this for every case, ie, always set the visibility on data change. Renderers are recycled and will not keep any state. Tracy ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Kenny Sent: Friday, May 23, 2008 11:24 AM To: [email protected] Subject: [flexcoders] Question regarding DataGrid Hello. In the following code, I would like to be able to reference the data field called "fn" from within the item renderer for the last column, which contains the RollOverButton. Can someone tell me how I can do this? What I want to do is have the button be visible in some cases, but not others. Thanks! Kenny CODE BELOW ================================== <mx:DataGrid id="dgMediaHistory" x="27" y="59" width="380" height="339" dataProvider="{svcGetMediaHistory.lastResult.dataset.mediahistory}" resizableColumns="false" allowMultipleSelection="false" allowDragSelection="false" draggableColumns="false" change="historyChangeHandler()"> <mx:columns> <mx:DataGridColumn headerText="Msg" dataField="fn" width="85"/> <mx:DataGridColumn headerText="Date" dataField="whenplayed" width="140"/> <mx:DataGridColumn headerText="" width="30"> <mx:itemRenderer> <mx:Component> <comp:RollOverButton width="20" height="20" upImage="{outerDocument.playImageUp}" overImage="{outerDocument.playImageOver}" downImage="{outerDocument.playImageDown}" click="outerDocument.playMedia()"/> </mx:Component> </mx:itemRenderer> </mx:DataGridColumn> </mx:columns> </mx:DataGrid>

