<?xml version="1.0" encoding="utf-8"?> <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
horizontalAlign="center" verticalAlign="middle" width="16" height="16" implements="mx.controls.listClasses.IDropInListItemRenderer" > <mx:Script> <![CDATA[ import mx.controls.listClasses.IDropInListItemRenderer; import mx.controls.listClasses.BaseListData; import mx.controls.dataGridClasses.DataGridListData; import mx.controls.DataGrid; [Bindable] private var source:String; private var _listData:BaseListData; public function get listData():BaseListData { return _listData; } public function set listData(value:BaseListData):void { _listData = value; invalidateProperties(); } override protected function commitProperties():void { super.commitProperties(); if (_listData is DataGridListData) { var dgld:DataGridListData = _listData as DataGridListData; source = data[DataGrid(dgld.owner).columns[dgld.columnIndex].dataField]; } } ]]> </mx:Script> <mx:Image source="{source}"/> </mx:VBox> ________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of missgiggygirl Sent: Saturday, March 17, 2007 10:13 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Passing different dataFields to the same itemRenderer component > You need to implement IDropInListItemRenderer (and the listData > property). The listData will give you the column that owns you. Wow, that "IDropInListItemRenderer" opens up a real can of worms. I can't believe that something simple like what I want to do can get so difficult all of a sudden. I am new to Flex, and have spent a couple hours reading through "IDropInListItemRenderer" threads and google articles and it is: 1. beyond my level of understanding 2. too fragmented; too few complete examples Anyway, you live and learn... Thanks for pointing me in the right direction. -- Ann