read about IDropInListItemRenderer and see how we use it in TextInput and Label
________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of waynelll Sent: Tuesday, October 02, 2007 8:35 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] itemRender set data question HI!! I am building a screen that is a DataGrid. Each DataGrid cell contains 2 Buttons and a TextArea. The DataGrid is built dynamically from data read from a file containing XML. ============================================= <class> <student name="Fernando Wong"> <work colName="Test1" gradeData="37" docStatus="1" feedBKStatus="1"/> <work colName="Test2" gradeData="77" docStatus="0" feedBKStatus="0"/> </student> </class> =============================================== I build the DataGrid =============================================== var dataList:XMLList = XmlData; var field_name:String; var dataObj:Object = new Object(); dataObj.name = dataList.student.child("name"); index = 0; for each(var child:XML in dataList.student.*) { field_name = "Test" + index; DataObj[field_name] = child; index++; } ================================================= I add the XML data to the ArrayCollection and then assign it as the DataProvider for the DataGrid =================================================== columnCollection.addItem(dataObj); gradeGrid.dataProvider = columnCollection; =================================================== I add the itemRender to the DataGridColumn ===================================================== for (var i:Number = 1; i<gradeGrid.columns.length; i++) { var gradeGridCol:DataGridColumn = gradeGrid.columns[i]; var renderer:ClassFactory = new ClassFactory(twoBtnPlusTextArea); gradeGridCol.itemRenderer = renderer; } // add the dataGrid to the screen addChild(gradeGrid); My problem is in the set data function in the item render. When I look at the data being passed to the itemRender. override public function set data(value:Object):void the event Object looks like this this = twoBtnPlusTextArea (@eb180a1) value = Object (@5255501) mx_internal_uid = "86A6F1AD-785B-B144-7CC6-614DEBF9F374" name = XMLList (@5283c69) Test0 = XML Test1 = XML What I can't figure out inside the itemRender is which data set,Test0 or Test1, to use for this specific cell. Is there some Cell information around I am not aware of??? Thanks for the help